You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I plan to use zltoolkit for development, the scenario is similar to: TcpClient receives > processes > tcp replies. Since the processing is time-consuming, if I use one thread for sending and receiving, and multiple threads for processing messages.
Processing takes a certain amount of time, should network sending and receiving be separated from message processing in different threads? Since zltoolkit uses a thread pool, how to ensure that message processing and tcp sending and receiving are performed in different threads.
If multiple threads are used for message processing, the processing time after receiving is uncertain. There are order requirements for sending and receiving, such as the receiving order is message 1 first, then message 2, then message 3, and the sending order requires sending message 1 first, then message 2, and then sending message 3. Will using a thread pool cause order problems?
I plan to use zltoolkit for development, the scenario is similar to: TcpClient receives > processes > tcp replies. Since the processing is time-consuming, if I use one thread for sending and receiving, and multiple threads for processing messages.
Processing takes a certain amount of time, should network sending and receiving be separated from message processing in different threads? Since zltoolkit uses a thread pool, how to ensure that message processing and tcp sending and receiving are performed in different threads.
If multiple threads are used for message processing, the processing time after receiving is uncertain. There are order requirements for sending and receiving, such as the receiving order is message 1 first, then message 2, then message 3, and the sending order requires sending message 1 first, then message 2, and then sending message 3. Will using a thread pool cause order problems?
1.处理有一定的时间消耗,是不是应该把网络收发,和报文处理分开不同线程处理?由于zltoolkit用的线程池,怎么保证报文处理和tcp收发再不同线程进行.
2.假如用多个线程来进行报文处理,接收后的处理耗时不定 。 收发有顺序要求比如 接收顺序为 先报文1 然后报文2 然后报文3 ,发送顺序要求 先发送报文1 ,然后报文2,再发送报文3。使用线程池会不会导致顺序问题?
TRANS_BY_GITHUB_AI_ASSISTANT
The text was updated successfully, but these errors were encountered: