mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-19 08:37:54 +01:00
![]() The DcSctpSocket is thread compatible. As long as you serialize accesses to it - either by calling it from the same thread, or using some kind of concurrency primitive (e.g. mutex) to avoid calling the API methods from different threads concurrently, it's fine. Using the sequence checker, we can verify that the socket is called from the thread it was created on, or from the same task queue. This provided a more strict verification, as it didn't allow e.g. creating a socket on one thread, and then handing it to a different thread where it was used. Nor did it allow having multiple threads use it, protecting any calls to it using an external mutex. One can avoid these checks using webrtc::CurrentTaskQueueSetter to allow the sequence checker to believe it's running where it's not running, but this is a hack. This CL removes the sequence checker in the socket, to simplify using it in environments that don't use task queues for synchronization. Since it is still kept in dcsctp::TaskQueueTimeoutFactory, it's still used in all environments where the task queue is used (e.g. Chrome). This makes it easier to use dcSCTP without WebRTC. Bug: None Change-Id: I2674d7cd902bad45ed3d0816c908ecf3ee971727 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333801 Reviewed-by: Florent Castelli <orphis@webrtc.org> Commit-Queue: Victor Boivie <boivie@webrtc.org> Cr-Commit-Position: refs/heads/main@{#41482} |
||
---|---|---|
.. | ||
BUILD.gn | ||
callback_deferrer.cc | ||
callback_deferrer.h | ||
capabilities.h | ||
context.h | ||
dcsctp_socket.cc | ||
dcsctp_socket.h | ||
dcsctp_socket_network_test.cc | ||
dcsctp_socket_test.cc | ||
DEPS | ||
heartbeat_handler.cc | ||
heartbeat_handler.h | ||
heartbeat_handler_test.cc | ||
mock_context.h | ||
mock_dcsctp_socket_callbacks.h | ||
packet_sender.cc | ||
packet_sender.h | ||
packet_sender_test.cc | ||
state_cookie.cc | ||
state_cookie.h | ||
state_cookie_test.cc | ||
stream_reset_handler.cc | ||
stream_reset_handler.h | ||
stream_reset_handler_test.cc | ||
transmission_control_block.cc | ||
transmission_control_block.h | ||
transmission_control_block_test.cc |