-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTODO
35 lines (28 loc) · 1.61 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
General:
- names for objects: threads, mailboxes, state machine states, loggers
- object name: the last part is the name passed to constructor,
previous parts come from dynamic scope
Thread:
- unify callback_list and nice_list? (spawning threads from functions in nice_list)
- T.recv introspection (see which thread is blocked on which sources)
Adapters:
- Channel (wakes up one listener at random)
- Fanout [async] (wakes up all listeners) (+ store/clear for permanent readiness?)
- Queue [async] (buffered; wakes up one listener at random)
- Dispatcher [maybe-async] (creates new listener threads as needed)
- Mailbox [async] (no free outputs; per-thread queue with selective receive)
Adapter outputs can be associated with:
- T.recv - to introduce complex logic (T.recv blocks the current thread until one of the sources is ready)
- function callbacks - to form simple pipelines (only one non-blocking callback at a time; enforced with T.spcall)
- other adapter inputs - to introduce buffering or fanout
Combos:
PubSub: Fanout > 1+ Queues
Thread-limited PubSub: Fanout > 1+ Mailbox
KVO: value-cell > Fanout (which can be used with callbacks or Queues)
Transformers: Source > function > Sink-Source
ThreadPool: Channel(buffered) > Dispatcher
Sepack:
- channels (and their capabilities: pins and such) avaliable on request, this forms a device specification
- specifications are validated agains connected devices after filtering them by product-name and serial-number
- these specifications (and filters) can be introspected so they can be shown to the user
- per channel "ready" observer for avoiding useless work