Author Topic: Find a bug if I disabled multi thread  (Read 1849 times)

fredwen

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Find a bug if I disabled multi thread
« on: May 14, 2015, 01:00:00 AM »
public class GameServer : FileServer
{
....
public bool isActive { get { return mThread != null; } }
....
}

If I undefined MULTI_THREADED for debug purpose, and found this isActive does not work because mThread is always null.

I think this is a bug. I change this line to "public bool isActive { get { return mListener != null; } }" as a workaround.

And I'm using 2.0.3, not sure if this is a fixed bug in the latest version.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Find a bug if I disabled multi thread
« Reply #1 on: May 14, 2015, 06:32:49 PM »
Seems reasonable to me.
  1. #if MULTI_THREADED
  2.         public bool isActive { get { return mThread != null; } }
  3. #else
  4.         public bool isActive { get { return mListener != null; } }
  5. #endif