Method code for $root.poll_semaphore()

[Turn on line numbering]
arg type;
var t;

if (!caller().has_flag('core))
    return;
while (1) {
    if (!semaphores) {
        semaphores = #[[type, task_id()]];
        return;
    }
    if (type((| (t = semaphores[type]) |)) == 'error || !(t in tasks())) {
        semaphores = dict_add(semaphores, type, task_id());
        return;
    }
    pause();
    pause();
    pause();
}

// $#Edited: 13 Nov 97 05:19 $miro

["// Created as a part of ColdCore, see: @help Credit"]

the Cold Dark