[Seaside-dev] WAPlatformTest>>testTerminate

Philippe Marschall philippe.marschall at gmail.com
Wed Apr 22 06:48:24 UTC 2009


2009/4/22 Michael Lucas-Smith <mlucas-smith at cincom.com>:
> Neat test,
>
> However, when a process is terminated in VisualWorks and it catches the
> termination with an ensure: or ifCurtailed or something else, it is not
> guaranteed that the ensure code will run before the process doing the
> terminating will run.
>
> There are two things you can do here:
> a) Add another semaphore in to wait until the ensure has run - but this
> might defeat the purpose
> b) Set the priority of the process you're testing to be higher than the
> running process, eg:
>   process priority: Processor activeProcess priority + 1.

That relies on explicit knowledge about implementation details about
the scheduler. I find that quite brittle.

Cheers
Philippe


More information about the seaside-dev mailing list