Skip to content

Commit 8839aae

Browse files
itamarstjeremiedbb
authored andcommitted
DOC Thread-safety requirement for open_listener message consumer callback (#34148)
1 parent 4d2476a commit 8839aae

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎sklearn/callback/_transport.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ def open_listener(message_consumer, *, owner=None):
7474
----------
7575
message_consumer : callable
7676
A one-argument function, `message_consumer(message)`, that processes incoming
77-
message to update the callback's state.
77+
message to update the callback's state. This callable may be called from
78+
multiple different threads, and must therefore behave in a thread-safe manner.
7879
7980
owner : callback instance, default=None
8081
Optional owner callback. When provided, the listener is automatically closed

0 commit comments

Comments
 (0)