-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
什么时候能时候能够实现无锁化?(Do you have a plan of no locker for threads?) #70
Comments
无锁就是cas,有时性能可能会更差!正在的无锁是线程独立运行,每个线程操作自己的部分,设计上非常麻烦 |
The library is multithreaded (CPUCount * 2 + 1), with each thread running independently without lockers |
TMonitor.Enter is used in many places in the code, so locks are used! |
最主要的是CreateConnection,不停创建对象,这个从MM管理器中申请内存,是使用锁的!最好使用无锁对象池! |
@pony5551 You're right! I only use the TCP server with my own protocol, but even in my case CrossSocket actively uses 1 TMonitor, which is the connection one, to have the list of active connections. This lock is inevitable, but what can be done is to reduce the operations inside the locks as much as possible reviewing all locks. |
有无锁化的计划吗?Do you have a plan of no locker for threads?
The text was updated successfully, but these errors were encountered: