This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Shared data structure in an eggdrop module.

Old posts that have not been replied to for several years.
Locked
M
M0dj0

Post by M0dj0 »

Hi all,

Currently I am writing my own eggdrop module and I have a small question regarding shared data structures. If I have two commands, i.e. two public commands, each of the commands will be linked to a function in my module. Now, if each function access a shared data structure, like adding, deleting elements in a shared linked list, should the accesses to the data structure be guarded by i.e. semaphores or something in the "command functions”? Or does the eggdrop bot do one command at a time?

Thanks in advanced,

M0dj0
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Eggdrop is not threaded, so there would be no guarding required.

Only threaded programs require this.
M
M0dj0

Post by M0dj0 »

Ok, thanx.
Locked