ljs | Lua with C/C++/Java/Javascript syntax
kandi X-RAY | ljs Summary
kandi X-RAY | ljs Summary
Lua with C/C++/Java/Javascript syntax.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ljs
ljs Key Features
ljs Examples and Code Snippets
Community Discussions
Trending Discussions on ljs
QUESTION
I am new to handling multiprocessing, multithreading etc.. in python.
I am trying to subscribe to multiple Websocket streams from my crypto exchange (API Docs Here), using multiprocessing
.
However, when I run the code below, I only receive ticker information
, but not order book updates
.
How can I fix the code to get both information?
What is the reason that only one websocket seems to be working when it's run on multiprocessing
?
(When I run the functions ws_orderBookUpdates()
and ws_tickerInfo()
separately, without using multiprocessing
, it works fine individually so it is not the exchange's problem.)
ANSWER
Answered 2021-Jun-08 at 12:46Update
You have created two daemon processes. They will terminate when all non-daemon processes have terminated, which in this case is the main process, which terminates immediately after creating the daemon processes. You are lucky that even one of the processes has a chance to produce output, but why take chances? Do not use dameon processes. Instead:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ljs
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page