*** ke4roh has joined #circuits | 00:15 | |
*** robert_ has joined #circuits | 02:51 | |
*** robert_ has quit IRC | 02:51 | |
*** robert_ has joined #circuits | 02:51 | |
*** Coldblackice_ has quit IRC | 05:29 | |
GitHub113 | [circuits] spaceone pushed 1 new commit to on_error#128: https://git.io/vDDhJ | 07:51 |
---|---|---|
GitHub113 | circuits/on_error#128 bccfe7f SpaceOne: specific handlers can overwrite error handling settings | 07:51 |
*** ke4roh has quit IRC | 12:44 | |
*** ke4roh has joined #circuits | 12:44 | |
*** chrismay has joined #circuits | 13:12 | |
ke4roh | spaceone: I want to try to fix #226. What are the guaranteed event state changes? | 17:00 |
*** nizox has joined #circuits | 20:54 | |
*** deepbook5brother has joined #circuits | 21:30 | |
*** deepbook5brother has left #circuits () | 21:30 | |
*** chrismay has quit IRC | 21:36 | |
spaceone | ke4roh: hi :) | 21:44 |
ke4roh | spaceone: hi | 21:44 |
spaceone | what exactly do you mean? | 21:44 |
ke4roh | spaceone: well, I looked at it, and it doesn't appear to have any such state. | 21:45 |
ke4roh | In my thinking, there should be some state indicating processing completed or similar on the event itself. | 21:45 |
ke4roh | a check of that before blocking to wait should suffice. | 21:46 |
ke4roh | but since it doesn't exist, I added it, but it doesn't pass the test, so I'm not quite understanding the waitEvent code yet... | 21:47 |
spaceone | ke4roh: did you read _dispatcher() ? | 21:47 |
spaceone | in _eventDone() you could (for your test) set event,__foo = True | 21:48 |
spaceone | and in waitEvent() you could return if getattr(event, '_foo') | 21:49 |
ke4roh | spaceone: why did you call out _dispatcher? | 21:50 |
ke4roh | (I have just looked at it) | 21:50 |
spaceone | so that you understand the main logix | 21:50 |
spaceone | logic | 21:50 |
ke4roh | k | 21:50 |
spaceone | of event processing | 21:50 |
ke4roh | good reason :) | 21:51 |
ke4roh | spaceone: let's look at manager for a moment together... | 21:54 |
spaceone | ok | 21:54 |
spaceone | where to start? | 21:54 |
ke4roh | spaceone: around line 743, "if event.complete:" | 21:54 |
spaceone | waitEvent? | 21:54 |
spaceone | yes | 21:55 |
ke4roh | so if I set a "completed" flag on the event before that check, that part is done. | 21:55 |
spaceone | yes | 21:56 |
ke4roh | spaceone: but in waitEvent ... around line 568 "yield state" | 21:56 |
ke4roh | ok so this "yield" indicates a generator and we'll produce state on the first call, | 21:56 |
ke4roh | then we'll produce CallValue on subsequent calls. | 21:56 |
ke4roh | how to appropriately consume this completed flag and bail? | 21:57 |
spaceone | waitEvent does nothing else than registering handlers | 21:57 |
ke4roh | I'm not seeing it yet. | 21:58 |
spaceone | i am currently unsure, do we need to consider complete? it seems so because of subevents? | 22:01 |
ke4roh | What is waitEvent supposed to do? | 22:02 |
ke4roh | we construct a _State and set up various callbacks. "_on_done" seems to be the core of the idea. | 22:05 |
spaceone | ke4roh: https://bpaste.net/show/6e969a0d0f9e | 22:05 |
spaceone | can you test this? | 22:05 |
spaceone | well waitEvent registers a event handler watching for every event | 22:06 |
spaceone | if the to-be-waited-for-event happens it returns from the coroutine | 22:06 |
ke4roh | I'll test that. | 22:07 |
ke4roh | I don't like having to add the attribute in the test. | 22:07 |
spaceone | hm? in which test? | 22:10 |
spaceone | it'S just to test the idea | 22:10 |
ke4roh | that's good. typing furously.. | 22:11 |
ke4roh | ok, I ran your patch and it fails with the timeout. | 22:13 |
spaceone | hm :( | 22:13 |
spaceone | then my idea might be wrong | 22:13 |
ke4roh | spaceone: I'd love to stay on, but I have to go now. I'll be back a little after noon GMT. | 22:18 |
spaceone | okay :) i am also very tired | 22:19 |
spaceone | but i will keep 15 minutes investigating this | 22:19 |
ke4roh | spaceone: thanks! | 22:22 |
spaceone | hmm, this is really odd | 22:36 |
Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!