-
-
Notifications
You must be signed in to change notification settings - Fork 608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clear settings['updates']['callback'] in __wakeup #213
Comments
That error is not caused by the callback, but by (one or more) bugs in pthreads, the same bugs that prevent MadelineProto from being threaded: I can't find a way to reproduce them with separate code snippets, so I can't open a proper issue @ krakjoe/pthreads, and make them fix everything. Some help to help reproduce these bugs would sure be appreciated; for now, refer to #4 |
OK, disregarding pthreads, the question remains - shouldn't we clear the reference to updates callback object after deserialization? |
Possibly, even if I can't find a reason for doing that. |
@danog Setting a new callback function(?) |
Serialization already throws an exception if we try to serialize a function callback, so clearing it on __wakeup is pointless. |
I pass my object and function name to updates callback. Settings of MadelineProto are serialized. So when deserializing MadelineProto, it restores reference to object from previous session. Shouldn't we clear it?
I am having particular issue with this because I have pthreads module installed on my server (though I don't use pthreads in MadelineProto) and because of that, I sometimes get this error:
The text was updated successfully, but these errors were encountered: