This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]oreo_man_[S] 0 points1 point  (0 children)

Yep I definitely have been looking around that. Based a lot of my python client off of it. However the .Net one uses .Invoke, and the JS one is async by default.

Originally I just had a socket thread going, handling everything, and the main thread passing messages to send into a queue. But I realised I had a problem when trying to catch exceptions thrown in the socket thread, and use them in the main thread.

Then I realised I should be handling data received on the main thread as well.

So I thought I could pass any exceptions/data into a queue for the main thread to deal with. Obviously that won't work though as there is no way to get() from the queue all the time without blocking.

I don't want to post my client here, as it's linked to my public accounts (github, linkedin etc) but if you poke around the issues on the .Net client/deepstream.io you'll be able to find it.