IRC Logs for #circuits Thursday, 2017-02-16

*** ke4roh has joined #circuits00:15
*** robert_ has joined #circuits02:51
*** robert_ has quit IRC02:51
*** robert_ has joined #circuits02:51
*** Coldblackice_ has quit IRC05:29
GitHub113[circuits] spaceone pushed 1 new commit to on_error#128: https://git.io/vDDhJ07:51
GitHub113circuits/on_error#128 bccfe7f SpaceOne: specific handlers can overwrite error handling settings07:51
*** ke4roh has quit IRC12:44
*** ke4roh has joined #circuits12:44
*** chrismay has joined #circuits13:12
ke4rohspaceone: I want to try to fix #226.  What are the guaranteed event state changes?17:00
*** nizox has joined #circuits20:54
*** deepbook5brother has joined #circuits21:30
*** deepbook5brother has left #circuits ()21:30
*** chrismay has quit IRC21:36
spaceoneke4roh: hi :)21:44
ke4rohspaceone: hi21:44
spaceonewhat exactly do you mean?21:44
ke4rohspaceone: well, I looked at it, and it doesn't appear to have any such state.21:45
ke4rohIn my thinking, there should be some state indicating processing completed or similar on the event itself.21:45
ke4roha check of that before blocking to wait should suffice.21:46
ke4rohbut 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
spaceoneke4roh: did you read _dispatcher() ?21:47
spaceonein _eventDone() you could (for your test) set event,__foo = True21:48
spaceoneand in waitEvent() you could return if getattr(event, '_foo')21:49
ke4rohspaceone: why did you call out _dispatcher?21:50
ke4roh(I have just looked at it)21:50
spaceoneso that you understand the main logix21:50
spaceonelogic21:50
ke4rohk21:50
spaceoneof event processing21:50
ke4rohgood reason :)21:51
ke4rohspaceone: let's look at manager for a moment together...21:54
spaceoneok21:54
spaceonewhere to start?21:54
ke4rohspaceone: around line 743, "if event.complete:"21:54
spaceonewaitEvent?21:54
spaceoneyes21:55
ke4rohso if I set a "completed" flag on the event before that check, that part is done.21:55
spaceoneyes21:56
ke4rohspaceone: but in waitEvent ... around line 568 "yield state"21:56
ke4rohok so this "yield" indicates a generator and we'll produce state on the first call,21:56
ke4rohthen we'll produce CallValue on subsequent calls.21:56
ke4rohhow to appropriately consume this completed flag and bail?21:57
spaceonewaitEvent does nothing else than registering handlers21:57
ke4rohI'm not seeing it yet.21:58
spaceonei am currently unsure, do we need to consider complete? it seems so because of subevents?22:01
ke4rohWhat is waitEvent supposed to do?22:02
ke4rohwe construct a _State and set up various callbacks. "_on_done" seems to be the core of the idea.22:05
spaceoneke4roh: https://bpaste.net/show/6e969a0d0f9e22:05
spaceonecan you test this?22:05
spaceonewell waitEvent registers a event handler watching for every event22:06
spaceoneif the to-be-waited-for-event happens it returns from the coroutine22:06
ke4rohI'll test that.22:07
ke4rohI don't like having to add the attribute in the test.22:07
spaceonehm? in which test?22:10
spaceoneit'S just to test the idea22:10
ke4rohthat's good.  typing furously..22:11
ke4rohok, I ran your patch and it fails with the timeout.22:13
spaceonehm :(22:13
spaceonethen my idea might be wrong22:13
ke4rohspaceone: I'd love to stay on, but I have to go now.  I'll be back a little after noon GMT.22:18
spaceoneokay :) i am also very tired22:19
spaceonebut i will keep 15 minutes investigating this22:19
ke4rohspaceone: thanks!22:22
spaceonehmm, this is really odd22:36

Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!