TcpClient锁定 [英] TcpClient locking

查看:71
本文介绍了TcpClient锁定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个线程,一个从TcpClient读取数据,另一个将数据写入同一个TcpClient。
我是否需要同步访问TcpClient或可以进行并发访问?

I have two threads one reads data from a TcpClient and other writes data to the same TcpClient.
Do I need to synchronize access to TcpClient or concurrent access is possible?

推荐答案

有人知道吗?我问过几个地方同样的问题,没有人给我答案,这个问题是如此困难吗?
does anybody know? i have asked several places the same question and nobody gave me answer, is that question so difficult?


这篇关于TcpClient锁定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆