RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Threaded WorldSave overlook?

UOT

Knight
Threaded WorldSave overlook?

Right now in the Save method of world you have
Code:
			if ( m_MultiProcessor )
			{
				Thread saveThread = new Thread( new ThreadStart( SaveItems ) );

				saveThread.Name = "Item Save Subset";
				saveThread.Start();

				SaveMobiles();
				SaveGuilds();
				SaveRegions();

				saveThread.Join();
			}
			else
			{
				SaveMobiles();
				SaveItems();
				SaveGuilds();
				SaveRegions();
			}
Isn't SaveItems missing from the threaded save?
Code:
			if ( m_MultiProcessor )
			{
				Thread saveThread = new Thread( new ThreadStart( SaveItems ) );

				saveThread.Name = "Item Save Subset";
				saveThread.Start();

				SaveMobiles();
				[COLOR=Red]SaveItems();[/COLOR]
				SaveGuilds();
				SaveRegions();

				saveThread.Join();
			}
			else
			{
				SaveMobiles();
				SaveItems();
				SaveGuilds();
				SaveRegions();
			}
 

Zippy

Razor Creator
No, the whole purpose of the threaded save is that it saves items concurrently in a thread started at the begining instead of saving them in line with everything else.

Thus this:
Code:
Thread saveThread = new Thread( new ThreadStart( SaveItems ) );

				saveThread.Name = "Item Save Subset";
				saveThread.Start();
Calls SaveItems() from a new thread.... The old thread then continues on to save mobiles, etc.
 

KillerBeeZ

Knight
does this mean that RunUO does indeed support multithreading? and how recent a change was this (as in which version was it implimented)?
 

Zippy

Razor Creator
RunUO has always been "multithreaded"

This change went in with 1.0.0, prior to that there was a different type of "threaded" world save that was implimented around beta 20. And RunUO's network has always been fully multithreaded.
 

KillerBeeZ

Knight
Zippy said:
RunUO has always been "multithreaded"

This change went in with 1.0.0, prior to that there was a different type of "threaded" world save that was implimented around beta 20. And RunUO's network has always been fully multithreaded.

Thank you

I was told a while ago that RunUO doesnt use multithreading, would this be the same as hyperthreading? if not, then that might be what I heard
 
Basicly, Hyperthreading is where you have one physical processor that represents itself as two "virtual" processors to the operating system, allowing it to execute 2 threads in parallel.

Whenever a thread executes on one of the processor's pipelines, it may do something that causes the thread to stall, ie.. floating point calculation, memory read ect... Whenever this happens, an HT enabled system can throw other threads into the other unused parts of the pipeline.
 
Top