Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
glo
Newbie


Joined: 01 May 2002
Posts: 7

PostPosted: Mon May 06, 2002 2:04 am   

Multithreaded workaround?
 
Hi,

I think I'm finally understanding the limitations of the fact that Zmud is not multithreaded. When I execute an alias that fires an ALARM it seem that if some other processing in the alias (a trigger gets fired by actions taken in the alias) is still executing, then the ALARM does not delete itself when it fires.

Is there a way to tell zmud in script to just delete any outstanding ALARMS?

Thanks,

Greg
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon May 06, 2002 3:36 am   
 
quote:

Hi,

I think I'm finally understanding the limitations of the fact that Zmud is not multithreaded. When I execute an alias that fires an ALARM it seem that if some other processing in the alias (a trigger gets fired by actions taken in the alias) is still executing, then the ALARM does not delete itself when it fires.

Is there a way to tell zmud in script to just delete any outstanding ALARMS?

Thanks,

Greg



You can likely do something like this:

#if (%trigger(YourAlarmIDhere)) {#untrigger YourAlarmIDhere} {#noop the alarm has already been deleted}

It SHOULD work, since an alarm is a type of trigger, but consider this untested.

li'l shmoe of Dragon's Gate MUD
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon May 06, 2002 4:27 am   
 
Strange. My temporary alarms (the ones I do for tests) always delete themselves. Doesn't matter if there are additional commands in the alias/trigger or not. You must have changed something. Go back to the defaults on all your preferences and see if that doesn't fix it.

%trigger() checks the status of classes, not individual triggers. So, in order to use it, you'd need to put all your alarms into a particular class (TempAlarms, maybe?). However, with all the alarms in a particular class, you wouldn't really need to use %trigger(), because you could just use #DELCLASS.

LightBulb
Vague questions get vague answers
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Mon May 06, 2002 11:58 am   
 
%defined() work for alarm trigger?

I've never used it for that but might prove
useful here.

TonDiening
Beta Upgrading to 6.26
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon May 06, 2002 5:45 pm   
 
%defined() doesn't appear to work on triggers. But it doesn't matter. #DELCLASS will delete the class, if it exists, along with all the settings in it. If the class doesn't exist (already deleted), it will do nothing. So there's really no need to test whether it exists -- just put all the "temporary" alarms in it and delete it when you don't want them anymore. zMUD 6.16 does delete temporary alarms (and temporary triggers) with its default settings, so glo has probably either changed something in preferences, or is using a beta version with a bug, or made a permanent alarm or trigger that's doing this.

LightBulb
Vague questions get vague answers
Reply with quote
glo
Newbie


Joined: 01 May 2002
Posts: 7

PostPosted: Tue May 07, 2002 9:36 pm   
 
I found my problem. It seems I broke a cardinal rule and used the #WAIT command. It was in an alias which I thought I had read was ok to do. Because the alias enables a trigger however I think it created timing problems. When I converted all #WAIT's to #ALARM's the problem went away.

Thanks for your suggestions.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net