ProcessEvents()

Post here your questions about the Unity / .Net / Mono / Windows 8 / Windows Phone 8 API for SFS2X

Moderators: Lapo, Bax

mumbi
Posts: 4
Joined: 09 Dec 2010, 05:30

ProcessEvents()

Postby mumbi » 13 Dec 2010, 03:40

Hi.

My client is Unity3D 3.1.

I had used sfs1.6.

At that time, response functions( OnLogin, OnExtensionResponse .. ) work well on not main thread without ProcessEvents().

Now, I'm using sfs2X.

But response functions( EventListener .. OnLogin, OnExtensionResponse.. ) don't work without ProcessEvents();

They work well on main thread with ProcessEvents().

Does Using ProcessEvents() depend on something like configuration ?

Actually, I wonder how to use responses functions on NOT main thread.

My English is poor, understand please.
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 13 Dec 2010, 08:38

I get what you are saying.

In SFS 1.X it was optional (and not default) to use the queue system where the API thread puts responses in a queue, that was then from the main thread polled to get around thread safety issues in Unity.

In SFS2X it is still optional (but it is turned on by default). Simply because in Unity its not adviced to run it with anything else than thread safe mode - unless you can control thread safety yourself

You can control this behaviour with a boolean on the SmartFox class (in 2X) by using the ThreadSafeMode property.

/Thomas

Return to “SFS2X C# API”

Who is online

Users browsing this forum: No registered users and 16 guests