IRC Logs for #circuits Friday, 2018-12-21

*** irclogger_do has joined #circuits10:32
*** kdb has joined #circuits10:32
*** kdb has quit IRC10:32
*** kdb has joined #circuits10:32
spaceoneprologic: hm, i have some trouble again :)11:58
spaceoneif a handler with highest priority calls event.stop() this works nice11:59
spaceonebut if the handler is itself a coroutine (aka yields something), then circuits doesn't jump into the function which calls event.stop()12:00
spaceonei found a workaround for it: defining another handler with a smaller priority (first_handler.priority - 0.1) which just calls event.stop().12:03
prologicyes12:03
prologicthat is a bit of an issue12:03
prologicisn't this mostly because coroutines aren't called first?12:03
spaceonethey aren't?12:04
spaceonei don't know, have to look into manager.py12:04
spaceonefinally now i understand why my server sometimes returns 2 http responses for 1 request12:04
spaceonethat drived me crazy some years ago12:04
spaceoneprologic: would you say we can fix this? or would it be an API change?12:07
spaceonei guess it's manager.py line 85812:10
prologichmm13:06
prologicI believe it could be fixed - yes13:07
prologicIIRC the nature of the way we implemented coros in circuits was to use Python's generators13:07
prologicthe problem is they return an object of type <generator> that doesn't start executing the code inside that function block until it's invoked13:07
prologicusually on the next tick() this happens13:07
spaceoneyep13:10
spaceonei will write a test case later13:11
spaceoneand then if it's easy to implement / debug i will try something13:11
GitHub44[circuits] spaceone created coroutine_invoke (+2 new commits): https://git.io/fhflU14:51
GitHub44circuits/coroutine_invoke 0edc3f4 SpaceOne: Add test for coroutines are immediately invoked14:51
GitHub44circuits/coroutine_invoke 495c8dc SpaceOne: WIP: test invoking coroutines immediately14:51
spaceoneprologic: i implemented a test case and some patch which can be used as starting point. would be nice if you could have a look, how it may be improoved14:52
spaceonehttps://github.com/circuits/circuits/commit/495c8dcec89156521f9f04d43cfe1465bd7ea2ba14:53
*** travis-ci has joined #circuits15:06
travis-cicircuits/circuits#745 (coroutine_invoke - 495c8dc : SpaceOne): The build has errored.15:06
travis-ciChange view : https://github.com/circuits/circuits/compare/0edc3f4d2122^...495c8dcec89115:06
travis-ciBuild details : https://travis-ci.org/circuits/circuits/builds/47101416115:06
*** travis-ci has left #circuits ()15:06
*** travis-ci has joined #circuits15:09
travis-cicircuits/circuits#745 (coroutine_invoke - 495c8dc : SpaceOne): The build has errored.15:09
travis-ciChange view : https://github.com/circuits/circuits/compare/0edc3f4d2122^...495c8dcec89115:09
travis-ciBuild details : https://travis-ci.org/circuits/circuits/builds/47101416115:09
*** travis-ci has left #circuits ()15:09
GitHub186[circuits] spaceone force-pushed coroutine_invoke from 495c8dc to bfac880: https://git.io/fhf4U15:15
GitHub186circuits/coroutine_invoke bfac880 SpaceOne: WIP: test invoking coroutines immediately15:15
*** travis-ci has joined #circuits15:16
travis-cicircuits/circuits#745 (coroutine_invoke - 495c8dc : SpaceOne): The build has errored.15:16
travis-ciChange view : https://github.com/circuits/circuits/compare/0edc3f4d2122^...495c8dcec89115:16
travis-ciBuild details : https://travis-ci.org/circuits/circuits/builds/47101416115:16
*** travis-ci has left #circuits ()15:16
*** travis-ci has joined #circuits15:28
travis-cicircuits/circuits#746 (coroutine_invoke - bfac880 : SpaceOne): The build failed.15:28
travis-ciChange view : https://github.com/circuits/circuits/compare/495c8dcec891...bfac8803990515:28
travis-ciBuild details : https://travis-ci.org/circuits/circuits/builds/47102534715:28
*** travis-ci has left #circuits ()15:28
*** travis-ci has joined #circuits15:44
travis-cicircuits/circuits#746 (coroutine_invoke - bfac880 : SpaceOne): The build failed.15:44
travis-ciChange view : https://github.com/circuits/circuits/compare/495c8dcec891...bfac8803990515:44
travis-ciBuild details : https://travis-ci.org/circuits/circuits/builds/47102534715:44
*** travis-ci has left #circuits ()15:44
*** travis-ci has joined #circuits15:51
travis-cicircuits/circuits#746 (coroutine_invoke - bfac880 : SpaceOne): The build failed.15:51
travis-ciChange view : https://github.com/circuits/circuits/compare/495c8dcec891...bfac8803990515:51
travis-ciBuild details : https://travis-ci.org/circuits/circuits/builds/47102534715:51
*** travis-ci has left #circuits ()15:51

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