Eleanor McHugh wrote:
> No need to be uncivilised ;) Idiomatic Ruby for an endless loop is
> better expressed as:
> 
>   loop do
>   end
> 

sweet thanks! Still trying to get a hang of ruby so tips like this are 
great for me ;)

> 
> Does get_live_feed use a separate thread internally? If so the cross-
> thread violation could well be related to garbage collection of the
> callback in which case you may need a separate callback instance for
> each feed handle. Also I note that you're using a constant to hold the
> callback, have you tried using a variable instead? Try turning off
> garbage collection altogether and see whether that affects the errors
> you receive. I've had some very amusing results doing that with DL
> callbacks :)
> 

I'm unsure if get_live_feed uses a seperate thread. I just have the dll 
and no source. If get_live_feed does use a seperate thread how would I 
make a seperate feed handle? Does that mean I need to declare a new 
callback and pass that each time I call live feed?

I tried using a variable but I still get the cross-thread violation. I 
noticed though if I do not use the structure and use other methods to 
display the data in the pointer I get more calls out of the callback 
before I hit the cross-thread violation. Just wondering was it wrong to 
use a constant for the callback?

I did some research on garbage collection. Is turning off garbage 
collection simply GC.disable? If I do disable garbage collection does 
that mean I have to run the free method on my pointers or put some extra 
code to free up memory?

Thanks again for all the help :)
-- 
Posted via http://www.ruby-forum.com/.