Single threaded client application #718
-
According to the documentation about the changes between V1 and V2, it sounds like all subscriptions have their own thread. Is it possible to keep the entire event loop on a single thread? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
v1 and v2 are a bit overloaded terms, unfortunately. Within the v2 device SDKs, GG IPC has two different clients: v1 IPC clients - callbacks all occur on the event loop thread that the network connection is bound to. It was a common occurrence for developers to accidentally deadlock their components by waiting on a completion event within a callback. This led the Greengrass team to develop "v2"/higher-level IPC clients that execute callbacks on a thread pool, avoiding the deadlock scenario. From a language-SDK perspective:
|
Beta Was this translation helpful? Give feedback.
-
Gotcha. Thanks! The explanation is much appreciated. |
Beta Was this translation helpful? Give feedback.
v1 and v2 are a bit overloaded terms, unfortunately. Within the v2 device SDKs, GG IPC has two different clients:
v1 IPC clients - callbacks all occur on the event loop thread that the network connection is bound to. It was a common occurrence for developers to accidentally deadlock their components by waiting on a completion event within a callback. This led the Greengrass team to develop "v2"/higher-level IPC clients that execute callbacks on a thread pool, avoiding the deadlock scenario.
From a language-SDK perspective: