Loading…
|
Translation changed |
|
|
String added in the repository |
|
Loading…
|
Translation changed |
|
|
String added in the repository |
|
As with most I/O objects, a webs与大多数 I/O 对象类似,WebSocketstream is [*not thread-safe]. Undefined behavior results if two different threads access the object concurrently. For multi-threaded programs, the `tcp_stream` can be constructed from an executor, in this case a strand. The stream declared below will use a strand to invoke all completion handlers:流本身 [*不是线程安全的]。如果两个不同的线程同时访问该对象,将导致未定义行为。对于多线程程序,`tcp_stream` 可以通过执行器(此处为串行器)构造。以下声明的流将使用串行器来调用所有完成处理器: