IRC Logs for #circuits Monday, 2016-08-08

ke4roh(I'm back)00:50
ke4rohI think the blocking answer is here: https://github.com/circuits/circuits/blob/master/examples/factorial.py01:00
prologicke4roh: yes use a worker to do this so you don't tie up the main event loop01:22
prologicyou can either have a thread or process worker pool or both (on different channels)01:22
prologicfire a task(f, *args, **kwargs) event where f is the blocking function and wait for it to complete before firing the next event01:23
prologiceither with task_complete or using the coroutine facilities yield self.call(task(...))01:23
prologicke4roh: A good example of this is in ccav: https://bitbucket.org/ccaih/ccav/src/846b536691089eabe560448590c17b9499fdb41c/src/ccav/api/map.py?at=default&fileviewer=file-view-default#map.py-13501:24
prologicA project I wrote in a previous job where the blocking "thing" is to call out to mapserv functionality01:25
prologicwhich can be seen/demoed here: http://ccav.terranova.org.au/climate-projection-geo-browser#scenario=RCP3PD&model=cccma-cgcm31&bioclim=bioclim_11&year=201501:25
ke4rohprologic: interesting the difference between the task and the Worker.  Gonna have to figure out the worker pool.  If I understand correctly, in either case, dispatching of the particular event blocks while the worker/task does its thing, but the dispatching thread is no longer blocked, so other events can get processed.01:33
prologicyeap02:37
prologicbasically if you identify some I/O or CPU bound "work" your app has to do; farm it off to a Worker pool and via task() for said work02:37
prologicBut yes the simplest example is the factorial one :)02:38
prologicke4roh: and if you run the example (which I just did to confirm) you'll notice that it basically demonstrates rather clearly the main event loop chugging along happily while some heavy computation is being worked on02:41
prologicThis is also how kdb does heavy lifting too02:41
ke4rohprologic: super.  I think that's the last of my questions before I have all the parts for my puzzle :)02:43
ke4rohprologic: I'm going to try with tornado for an async web client.02:43
*** Osso has joined #circuits03:42
*** RudyValencia has quit IRC04:15
*** RudyValencia has joined #circuits04:16
*** RudyValencia has quit IRC04:28
*** RudyValencia has joined #circuits04:31
*** RudyValencia has quit IRC04:36
*** ke4roh has quit IRC04:46
*** Osso has quit IRC04:53
GitHub140[circuits] prologic closed pull request #177: Update components.rst (master...patch-1) https://git.io/v6Oy009:09
GitHub76[circuits] prologic pushed 1 new commit to master: https://git.io/v6sHz09:09
GitHub76circuits/master 4431be0 Jim Scarborough: Update components.rst (#177)...09:09
*** travis-ci has joined #circuits09:29
travis-cicircuits/circuits#491 (master - 4431be0 : Jim Scarborough): The build has errored.09:29
travis-ciChange view : https://github.com/circuits/circuits/compare/566eab6d7e86...4431be0b637209:29
travis-ciBuild details : https://travis-ci.org/circuits/circuits/builds/15057594409:29
*** travis-ci has left #circuits ()09:29
*** Coldblackice has quit IRC09:44
*** RudyValencia has joined #circuits11:37
*** ke4roh has joined #circuits11:52
*** Osso has joined #circuits11:58
*** Osso has quit IRC17:01
*** robert_ has quit IRC19:52
*** Coldblackice has joined #circuits20:27
*** Osso has joined #circuits22:24
*** ke4roh has quit IRC23:57
*** ke4roh has joined #circuits23:57

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