Concept Framework 1.0 documentation Contents | Index

standard.lib.shared.share_unlock

Name Version Deprecated
share_unlock version 1.0 no

Prototype:
boolean share_unlock(number share_handle)

Parameters:
share_handle      the shared memory handle as returned by share_create or share_open.

Description:
Unlocks the access to a shared memory segment previously locked with share_lock.

Example:
import standard.lib.shared


class Main {
function Main() {
var ctx=share_open(123);
echo ctx;
share_lock(ctx);
for (var i=0;i<200000;i++) {
share_set(ctx,""+i);
}
echo "done lock";
echo "SH:"+share_unlock(ctx)+"\n";
echo "SH:"+share_unlock(ctx)+"\n";
echo share_get(ctx);
echo "\n";
echo typeof this;
while (1) {
echo ""+share_link_count(ctx)+"\r";
}
}
}

Returns:
Returns true if succeeded, false if failed (not locked).

Documented by Eduard Suica, generation time: Thu Oct 15 20:02:06 2009 GMT(c)2009 RadGs Software