diff options
Diffstat (limited to 'odcsim/odcsim-api/src')
| -rw-r--r-- | odcsim/odcsim-api/src/main/kotlin/com/atlarge/odcsim/Port.kt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/odcsim/odcsim-api/src/main/kotlin/com/atlarge/odcsim/Port.kt b/odcsim/odcsim-api/src/main/kotlin/com/atlarge/odcsim/Port.kt index 30d4790c..7c730866 100644 --- a/odcsim/odcsim-api/src/main/kotlin/com/atlarge/odcsim/Port.kt +++ b/odcsim/odcsim-api/src/main/kotlin/com/atlarge/odcsim/Port.kt @@ -24,6 +24,8 @@ package com.atlarge.odcsim +import kotlinx.coroutines.selects.SelectClause1 + /** * A communication endpoint of a specific logical process through which messages pass. * @@ -48,6 +50,11 @@ public interface ReceivePort<out T : Any> : Port { * Receive a message send to this port or suspend the caller while no messages have been received at this port yet. */ public suspend fun receive(): T + + /** + * Clause for select expression for receiving a message from the channel. + */ + val onReceive: SelectClause1<T> } /** |
