How threaded it is?
#4
Threaded mods? what do you mean?

Mobs are fixed, they need to be handled in the world's tick thread and there could be only one tick thread per world.

Current mobs are crappy, hopefully we'll get a new AI one day. But still, all in one thread. That's one of the reasons that the minecraft servers are so CPU-heavy.

It's not so much "one thread per plugin" as "no more than one thread executing one plugin's code". Plugins run in the thread in which their hook has happenned - OnTick is called in the context of the tick thread, OnChat is called in the player comm handling thread, etc. But there's a simple guarantee that no more than one thread is executing any single plugin's code (otherwise it would be a mess).

A while ago I was pondering about plugin-created threads - so that plugins can queue tasks for later execution etc. But it's quite difficult with the current Lua integration (i. e. I have no idea on how to do thatTongue )
Reply
Thanks given by:


Messages In This Thread
How threaded it is? - by Taugeshtu - 06-12-2012, 02:47 AM
RE: How threaded it is? - by xoft - 06-12-2012, 04:43 AM
RE: How threaded it is? - by Taugeshtu - 06-12-2012, 05:02 AM
RE: How threaded it is? - by xoft - 06-12-2012, 05:10 AM
RE: How threaded it is? - by FakeTruth - 06-12-2012, 05:19 AM



Users browsing this thread: 1 Guest(s)