Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
xieyuheng committed Aug 29, 2023
1 parent 4ec834e commit 51b11cd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
8 changes: 0 additions & 8 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
`cap` as a builtin

# articles

[docs] 反应网编程 -- 加入到 演算场 的连接
Expand All @@ -8,12 +6,6 @@
[docs] 反应网编程 -- 完成 `DiffList` 的讲解
[docs] 反应网编程 -- 翻译为 programming-with-interaction-nets

# edge

edge as entity

port should be connected to edge instead of port

# propaganda

post on v2ex
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
title: Port should connect to wire instead of port
title: Port should connect to edge instead of port
author: Xie Yuheng
date: 2023-08-27
---

In a shared-memory multithread implementation,
port must connect to wire instead of port,
port must connect to edge instead of port,
so that parallel updates of the net will not
interfere with each other.

Since JavaScript is singlethread
this does not matter,
but as a reference implementation
port still should connect to wire instead of port.
port still should connect to edge instead of port.
7 changes: 7 additions & 0 deletions src/lang/net/Net.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ export type PortEntry = {
connection?: Connection
}

// For a shared-memory multithread implementation.
// - We must define `EdgeEntry`.
// - `Net` must have `edgeEntries: Map<string, EdgeEntry>`.
// - Port must connect to edge instead of port,
// so that parallel updates of the net will not
// interfere with each other.

export type Connection = {
port: Port
}

0 comments on commit 51b11cd

Please sign in to comment.