Announcement Announcement Module
No announcement yet.
SynchronousChannel and transactions Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • SynchronousChannel and transactions


    "The M3 release provides a new SynchronousChannel so that a handler can execute within the sender's thread, and a pollable-source can be polled within a receiver's thread. These enable transactions to propagate from a sender or receiver to the handler or pollable-source respectively. "

    What does this mean? Is there an example available?

  • #2

    Currently, the only examples of SynchronousChannel are the test cases: SynchronousChannelTests and SynchronousChannelSubscriptionTests.

    In M3, this is basically a "preview" feature and may be changing considerably for M4. That's the reason that it was not documented in any detail. The general idea is to support sending and receiving with a single-threaded model rather than always having a sender and receiver in different threads. Even the name of the class is up for debate however, since the SynchronousChannel (and SynchronousQueue) are typically used to describe direct-handoff scenarios where there are still separate threads but either side will block until a handoff is made.