Bug 3891 – core.Thread constructors don't accept shared delegates

Status
RESOLVED
Resolution
WONTFIX
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2010-03-07T20:37:00Z
Last change time
2015-06-09T01:27:57Z
Assigned to
nobody
Creator
Justin.SpahrSummers

Comments

Comment #0 by Justin.SpahrSummers — 2010-03-07T20:37:07Z
It seems logical that Thread objects should be constructed with delegates marked "shared," but there's no way to do this right now: --- import core.thread; class A { void doSomethingMultithreaded () shared { // blah blah } } void main () { auto a = new shared(A)(); auto t = new Thread(&a.doSomethingMultithreaded); t.start(); } --- Even in lieu of making it mandatory, an overloaded constructor making use of this would be helpful.
Comment #1 by Justin.SpahrSummers — 2010-03-07T20:51:11Z
Just noticed this newsgroup post too: http://www.digitalmars.com/d/archives/digitalmars/D/Concurrency_architecture_for_D2_104120.html#N104479 Which I guess makes this whole report moot.