in reply to Re: The & prototype and code references in scalars.
in thread The & prototype and code references in scalars.
The first example isn't an option because the sub in question is in a module (threads::async()). Also it defeats the most common use case of an in-line bareblock.
The latter doesn't help as I only have (multiple) coderefs at the place of use. I could use async{ $coderef->( ... ) };, but I'm not keen on the doubling of the call overhead.
I just rediscovered async \&{ $codeRef };. I'm not sure if that's equally costly.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: The & prototype and code references in scalars.
by LanX (Saint) on Feb 17, 2010 at 21:51 UTC | |
by BrowserUk (Patriarch) on Feb 18, 2010 at 00:17 UTC | |
by LanX (Saint) on Feb 18, 2010 at 00:25 UTC |