IRC Logs for #circuits Thursday, 2013-10-17

*** ninkotech has joined #circuits08:44
spaceoneprologic: hmm, but can you give a clear answer of which dispatcher you would prefer?15:17
*** jgiorgi has joined #circuits18:40
jgiorgiprologic: is there a built in method for file chunking over TCPClient / TCPServer18:41
jgiorgii want to avoid loading the entire file into memory18:41
spaceonejgiorgi: circuits.web.wrapppers.file_generator20:40
spaceoneyield chunks of 4kb for a file20:40
jgiorgihrmm20:42
jgiorgiso i could iterate over that generator firing write events20:43
jgiorgion the other side it would be as easy as appending the file20:44
jgiorgithanks20:44
spaceoneyep20:46
spaceoneprologic: what are the new dummy stub event handlers for?22:03
prologicnothing just to supress the UnhandledEvenyWarning22:05
prologicEvent22:05
spaceoneok22:08
prologicIn dev an UnhandledEventWarning is raised for anu events that went unhandled22:09
spaceonea real exception ?22:10
spaceonehmm22:10
spaceonei don't find this productive22:10
prologicno22:11
prologiconly a warning22:12
jgiorgihow does one generate events (the old __tick__?) i cant remember22:16
spaceone'generate' ?22:16
spaceoneevt.create('asdf')22:16
spaceonecomp.fire(evt)22:17
jgiorgireferring more to a poller22:17
jgiorgiat the end of the main loop poll and fire events, i remember there is a method circuits looks for that runs at the end of the main loop (used to be called __tick__)22:17
jgiorgiok so looking at sockets.py i see that the sockets use core.pollers,Poller which has a generate_events handler22:21
jgiorgibut i see that handler is a filter which doesnt make sense, wouldn't that mean only one poller could exist within the system?22:22
*** jgiorgi has quit IRC22:50
*** jgiorgi has joined #circuits23:02
jgiorgisorry winblows crashed, if anyone answered please repeat23:02
prologicjgiorgi:  yes this is correct23:32
prologicgenerate_events is the event you need to listen to23:32
prologicand yes there can only be at most one poller per process23:32
prologichowever you can have as many other event sources as you like though23:32
prologicthe reason it's a filter in the pollers is because if you have more than one poller23:32
prologicthe system locks up ;)23:32
prologicor rather they tend to fight each other23:33
prologicit only makes sense to have one fd/socket poller at a time23:33
prologicbut yes the old __tick__ has been deprecated and replaced with an aptly named event called generate_events23:33
prologicso just write a handler for that and register your custom event source23:33
prologictimers uses this23:34
prologicpollers does23:34
prologiccircuits.core.pollers, circuits.core.timers and circuits.ioprocess23:35
prologicall generate events23:35
prologicas well as a default one in circuits.core.helpers23:35
prologicwhich if there are no other event sources in the system23:36
prologicwill cause it to sleep for a very long time23:36
prologicso as to not eat cpu23:36
jgiorgicool, i setup a generate events handler at -8 priority, hopefully that will work23:50
prologicthe priority is not really necessary23:56
prologiciirc23:57

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