Tango bind functionality

Jason House jason.james.house at gmail.com
Wed Jul 25 20:28:37 PDT 2007


I've found http://www.dsource.org/projects/tango/ticket/396 which 
indicates that bind functionality is indefinitely postponed.  It's even 
marked as a closed ticket!

I'm in the process of porting code over from phobos to tango.  All I 
have left to do is resolve all of my calls to bind.

I'm using delegates as generic signaling between threads.  The problem 
is that creating a delegate on the fly (using {}) won't work in many 
cases.  Because of the async nature, the local stack frame won't be 
available and all accesses to variables are lost.  It's a real hack to 
manually create helper objects (with a constructor and opCall function) 
for simple things that can be replaced with bind(&foo.bar, a, b)

Even if not part of tango, does anyone have any generic tango-based 
solution for this?  (Note that the phobos implementation of bind does 
not work completely in gdc 0.23.  I'm hesitant to just copy the phobos 
implementation)


More information about the Digitalmars-d-learn mailing list