The community forums are in BETA and closed to the public.

Cleanly shutting down pubnub-sync C sdk

We use pubnub-sync from the C sdk. We have multiple threads. One thread is in a subscribe loop that is similar to the sdk example. We want to cleanly terminate this thread from outside (i.e. another thread). The pubnub-sync functions are blocking. Is there a way to unblock a call being in progress?

We expected that pubnub_unsubscribe would do so. Apparently not.


Hi, could you please provide info on what platform you are using. The main info that would be help: - OS (Linux, Windows, BSD ...) - version(s) of the OS - any hardware that is specific to your application - any other constraints applicable (memory, timing etc)


Hi Vladimir,

OS: Linux/OpenWRT;

Version: v14 Barrier Breaker;

Hardware: Qualcomm/Atheros AR9331 SoC;

Constraints: memory is limited, max. usage is about 500kB; timing is not that critical, if an unsubscribe would take 30s it would be sub-optimal but acceptable, if it would take 1s it would be perfect.

Thanks in advance.

Login or Signup to post a comment