| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| Hi there, in reference to http://groups.google.com/group/comp....f04d0252c5142b and after two days of pain I've finally found a solution for that problem: making the response an instVar so the continuation wont overwrite the result as nil. I have not found final evidence but all I've seen indicates that continuations in Squeak and VisualWorks have some sort of compensation effect for temps which Dolphin has not. So they wont overwrite the temp which receives the answer of the block evaluation with nil as Dolphin does. The code I'm using now is WAProcessMonitor>>critical: aBlock ifError: anErrorBlock ^ mutex critical:[ semaphore := SeasidePlatformSupport semaphoreClass new. process := [[response := aBlock on: Error do: anErrorBlock] ensure: [semaphore signal]] fork. semaphore wait. process := nil. response]. For the record the previous was: | value | mutex critical: [process := Processor activeProcess. [value := aBlock on: Error do: anErrorBlock] ensure: [process := nil] ]. ^ value which is a workaround which uses more than 400% of additional RAM unnecessarily (because the continuation will copy the process to its born far there in swazoo). That fork is cutting the copy just where it is needed (a pity those subtleties aren't documented). I hope this is one problem less for Dolphin Seasiders, Cheers, Sebastian |
|
#2
| |||
| |||
| Nice find/fix! |
|
#3
| |||
| |||
| On Aug 26, 11:16*pm, "Malbs" <ssefl...@somewhere.com> wrote: > Nice find/fix! Subject magic ![]() Also check: http://groups.google.com/group/comp....aaebf80?hl=en# cheers, Sebastian |
|
#4
| |||
| |||
| Sebastian <ssastre@seaswork.com.ar> wrote: > and after two days of pain I've finally found a solution for that > problem: making the response an instVar so the continuation > wontoverwrite the result as nil. Any chance you could put your Seaside corrections into the global repository that David has now provided? We need to get better at having a global place with all latest fixes (I'm equally guilty as well) Tim -- I'm trying a new usenet client for Mac, Nemo OS X. You can download it at http://www.malcom-mac.com/nemo |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.