summaryrefslogtreecommitdiff
path: root/render/render.go
diff options
context:
space:
mode:
authorAndrew Gallant (Ocelot) <[email protected]>2012-05-12 21:55:57 -0400
committerAndrew Gallant (Ocelot) <[email protected]>2012-05-12 21:55:57 -0400
commitc27e49fbcfbb6c2381c3edc5a7765d7ca6e4f226 (patch)
tree89546d542213bae3794152f474a227de4595ce2a /render/render.go
parente93d7d109a1eaf93b67636e04d6a795d49b15b37 (diff)
A more idiomatic way of trying a non-blocking send on a buffered channel
and falling back to a blocking send inside a goroutine. This really needs to be fixed. The situation only arises when events are sent and aren't pulled off the channel using {Wait,Poll}ForEvent. Namely, if the event send blocks, the entire program will deadlock. Using a goroutine is not ideal because we lose a guarantee of order: that events are processed in the order of their arrival. However, it seems OK as a temporary band-aide for a situation that probably doesn't arise too often. What I need to do is implement a dynamic queue. Here is a reference implementation: http://play.golang.org/p/AiHBsxTFpj
Diffstat (limited to 'render/render.go')
0 files changed, 0 insertions, 0 deletions