Hi Tim,
I did try invokeLater before unsuccessfully. I think the problem was that
the Graphics I passed on the channel wasn't valid anymore. This time around
I tried getting the graphics with Component.getGraphics instead, inside
invokeLater. That worked!
By the way, I think core.async is fanta
Den måndagen den 29:e juli 2013 kl. 16:44:50 UTC+2 skrev
eliass...@yahoo.com:
>
> Hi, I'm playing around with core.async a bit.
> Is it possible to put java.awt.Graphics object into a channel and do the
> drawing in a go loop consuming this channel.
> The problem I'm having is that when I consu
I recommend using invokeLater to send a fn to Swing to do the rendering.
http://docs.oracle.com/javase/6/docs/api/javax/swing/SwingUtilities.html#invokeLater(java.lang.Runnable)
If you need Swing to notify the go channel when the rendering is complete,
you can do something like this:
(go
(let
Hi, I'm playing around with core.async a bit.
Is it possible to put java.awt.Graphics object into a channel and do the
drawing in a go loop consuming this channel.
The problem I'm having is that when I consume the channel, core.async has
switched to another thread. I'm not in the Swing thread any