-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathTODO
More file actions
27 lines (27 loc) · 1.15 KB
/
TODO
File metadata and controls
27 lines (27 loc) · 1.15 KB
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
[16-oct-09]
- Passing in something that will block instead of queue - eg
a socket. Does this make sense?
- Having several queues? Would this have an effect or does it
really matter?
[14-oct-09]
- How do we handle the issue of returning stuff?
What's the best way for a thread in the thread pool to
return its result if it needs to?
Should we have a mechanism linking the thread that pushes
the work item onto the pool and the result of this work item?
- dispatch(lambda) to become dispatch(lambda,arg1,arg2...)
- Move ThreadPool.rb into lib/ and create lib/threadpool for any
future .rb files
- Use Thread#[] to add properties like [:started] = Time.now etc
- Create a ThreadGroup within a ThreadPool instance and add all
created threads to it.
#add, #list what else?
- Have a response queue where threads from the pool can
push a return object.
The calling thread could wait on this queue.
- Get rid of the mutex in thread pool.
Re-write live tests to use an independent mutex.
Does it make sense to have tp.mutex ??
- ThreadPool.new(5,100) will create a threadpool with
sized queue of 100 entries.
Verify that the queue will block after 100