function getstatus($arg){
print_r(connection_status());
debug_print_backtrace();
}
reigster_tick_function("getstatus", true);
declare(ticks=1){
for($i =1; $i<999; $i++){
echo "hello";
}
}
unregister_tick_function("getstatus");
function getstatus($arg){
print_r(connection_status());
debug_print_backtrace();
}
reigster_tick_function("getstatus", true);
declare(ticks=1){
for($i =1; $i<999; $i++){
echo "hello"; getstatus(true);
}
}
unregister_tick_function("getstatus");
$mesg_key = ftok(__file__, 'm');
$mesg_id = msg_get_queue($mesg_key, 0666);
function fetchmessage($mesg_id){
if(!is_resource($mesg_id)){
print_r("mesg queue is not ready");
}
if(msg_receive($mesg_id, 0, $mesg_type, 1024, $mesg, false, msg_ipc_nowait)){
print_r("process got a new incoming msg: $mesg ");
}
}
register_tick_function("fetchmessage", $mesg_id);
declare(ticks=2){
$i = 0;
while(++$i < 100){
if($i%5 == 0){
msg_send($mesg_id, 1, "hi: now index is :". $i);
}
}
}
//msg_remove_queue($mesg_id);
process got a new incoming msg: s:19:"hi: now index is :5"; process got a new incoming msg: s:20:"hi: now index is :10"; process got a new incoming msg: s:20:"hi: now index is :15"; process got a new incoming msg: s:20:"hi: now index is :20"; process got a new incoming msg: s:20:"hi: now index is :25"; process got a new incoming msg: s:20:"hi: now index is :30"; process got a new incoming msg: s:20:"hi: now index is :35"; process got a new incoming msg: s:20:"hi: now index is :40"; process got a new incoming msg: s:20:"hi: now index is :45"; process got a new incoming msg: s:20:"hi: now index is :50"; process got a new incoming msg: s:20:"hi: now index is :55"; process got a new incoming msg: s:20:"hi: now index is :60"; process got a new incoming msg: s:20:"hi: now index is :65"; process got a new incoming msg: s:20:"hi: now index is :70"; process got a new incoming msg: s:20:"hi: now index is :75"; process got a new incoming msg: s:20:"hi: now index is :80"; process got a new incoming msg: s:20:"hi: now index is :85"; process got a new incoming msg: s:20:"hi: now index is :90"; process got a new incoming msg: s:20:"hi: now index is :95";
function memoryusage(){
printf("%s: %s<br/>", date("h:i:s",time()), memory_get_usage());
//var_dump(debug_backtrace());
//var_dump(__function__);
//debug_print_backtrace();
}
register_tick_function("memoryusage");
declare(ticks=1){
$shm_key = ftok(__file__, 's');
$shm_id = shmop_open($shm_key, 'c', 0644, 100);
}
printf("size of shared memory is: %s<br/>", shmop_size($shm_id));
$shm_text = shmop_read($shm_id, 0, 100);
eval($shm_text);
if(!empty($share_array)){
var_dump($share_array);
$share_array['id'] += 1;
}else{
$share_array = array('id' => 1);
}
$out_put_str = "$share_array = " . var_export($share_array, true) .";";
$out_put_str = str_pad($out_put_str, 100, " ", str_pad_right);
shmop_write($shm_id, $out_put_str, 0);
?>
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有