RE: [personal kdb+] Re: c.java and sync .u.sub

User-Agent: Workspace Webmail 5.14.0Message-Id: <20150506081440.85f80dae80d1d2f2e266ec6278e6cbe8.0c770c7fb7.wbe@email07.europe.secureserver.net>From: “David Demner (AquaQ)” <david.demner>To: personal-kdbplus@googlegroups.comSubject: RE: [personal kdb+] Re: c.java and sync .u.subDate: Wed, 06 May 2015 08:14:40 -0700Mime-Version: 1.0

Hi Leonid,


It sounds like you're trying to use the same socket from different threads - note that sockets are NOT thread safe.

I suspect that you'll need to abort the Java thread in (1) before sending the sub in (2) and then starting the listener thread (1) again once the subscription (2) is successful.

Hope that helps,

David

I wouldn’t recommend it, but you can send async from one thread, and read from another thread - that doesn’t answer your question anyway, as you ask for a sync confirmation.

An alternative not mentioned so far would be to change the code on the remote, so that you can manage subscriptions on a handle via a separate handle.