Comments (12)
I also want itπ€―
from ll-mtproto.
@iamDonkey I'm trying to find a solution but I'm not finding an easy way.
from ll-mtproto.
a8fa5f2#diff-184fc5e51edee9e0cbe93c22165b2e4809c9279ea8d645de86630af29a75c751R378
if you look i made the way that the non deserialized body is read in the main thread, now it should be done that the second schema.read (the one under the todo) is done in another thread, the problem is that the deserializer is asynchronous so i should start another async loop on another thread and i don't like that my library does it internally, it could lead to leaks.
from ll-mtproto.
@iamDonkey you can try the mt_body_deserialize branch, I have implemented a multithreaded deserialiser, you can let me know if it works well for you
from ll-mtproto.
from ll-mtproto.
hi @andrew-ld i don't know how to test it but right now master branch seems to be broken.
ERROR:root:failure while read message from mtproto: Traceback (most recent call last):
File "/root/LL-mtproto-master/ll_mtproto/client.py", line 258, in _mtproto_loop
message = await mtproto_link.read()
File "/root/LL-mtproto-master/ll_mtproto/network/mtproto.py", line 332, in read
auth_key, auth_key_id = await self._get_auth_key()
File "/root/LL-mtproto-master/ll_mtproto/network/mtproto.py", line 170, in _get_auth_key
await self._create_auth_key()
File "/root/LL-mtproto-master/ll_mtproto/network/mtproto.py", line 190, in _create_auth_key
new_nonce, (p, q) = await asyncio.gather(
File "/root/LL-mtproto-master/ll_mtproto/network/mtproto.py", line 134, in _in_thread
return await self._loop.run_in_executor(self._executor, *args, **kwargs)
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/root/LL-mtproto-master/ll_mtproto/math/primes.py", line 7, in factorize
return cryptg.factorize_pq_pair(pq)
AttributeError: module 'cryptg' has no attribute 'factorize_pq_pair'
from ll-mtproto.
@iamDonkey is not broken, you have to update the dependencies.
pip3 install -U -r requirements.txt
from ll-mtproto.
from ll-mtproto.
because the other branch does not use cryptg.factorize_pq_pair, make sure you have cryptg 0.3 installed.
from ll-mtproto.
from ll-mtproto.
hi @andrew-ld , i am trying to call a method concurrently/parallel request using asyncio.gather(*array of function) but if i check responses received time its like sequential.
is it the right way of calling method concurrently?
from ll-mtproto.
Line 49 in b5ddb6c
from ll-mtproto.
Related Issues (9)
- how to use this library? HOT 12
- crypto providers
- Unknown constructor 0x1cb5c415 HOT 3
- layer 140 HOT 4
- response to json HOT 10
- ConnectionResetError HOT 10
- received a message with unknown salt! HOT 24
- implement queue based mtproto messages write HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ll-mtproto.