mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-18 20:53:50 -04:00
fix some event name collisions with multiple CR's, tag some more methods BLOCKING
This commit is contained in:
parent
e749054ba5
commit
b0993e4a53
@ -55,7 +55,8 @@ class ClientRepository(ClientRepositoryBase):
|
|||||||
def createReady(self):
|
def createReady(self):
|
||||||
# Now that we've got a doId range, we can safely generate new
|
# Now that we've got a doId range, we can safely generate new
|
||||||
# distributed objects.
|
# distributed objects.
|
||||||
messenger.send('createReady')
|
messenger.send('createReady', taskChain = 'default')
|
||||||
|
messenger.send(self.uniqueName('createReady'), taskChain = 'default')
|
||||||
|
|
||||||
def handleRequestGenerates(self, di):
|
def handleRequestGenerates(self, di):
|
||||||
# When new clients join the zone of an object, they need to hear
|
# When new clients join the zone of an object, they need to hear
|
||||||
|
@ -100,10 +100,6 @@ class ClientRepositoryBase(ConnectionRepository):
|
|||||||
## self.send(datagram)
|
## self.send(datagram)
|
||||||
## # Make sure the message gets there.
|
## # Make sure the message gets there.
|
||||||
## self.flush()
|
## self.flush()
|
||||||
|
|
||||||
# Define uniqueName
|
|
||||||
def uniqueName(self, desc):
|
|
||||||
return desc
|
|
||||||
|
|
||||||
def specialName(self, label):
|
def specialName(self, label):
|
||||||
name = ("SpecialName %s %s" % (self.specialNameNumber, label))
|
name = ("SpecialName %s %s" % (self.specialNameNumber, label))
|
||||||
|
@ -56,6 +56,10 @@ class ConnectionRepository(
|
|||||||
|
|
||||||
self.config = config
|
self.config = config
|
||||||
|
|
||||||
|
# Create a unique ID number for each ConnectionRepository in
|
||||||
|
# the world, helpful for sending messages specific to each one.
|
||||||
|
self.uniqueId = hash(self)
|
||||||
|
|
||||||
if self.config.GetBool('verbose-repository'):
|
if self.config.GetBool('verbose-repository'):
|
||||||
self.setVerbose(1)
|
self.setVerbose(1)
|
||||||
|
|
||||||
@ -646,6 +650,9 @@ class ConnectionRepository(
|
|||||||
self.notify.info('*** RESTORING SIMULATED PULLED-NETWORK-PLUG ***')
|
self.notify.info('*** RESTORING SIMULATED PULLED-NETWORK-PLUG ***')
|
||||||
self.setSimulatedDisconnect(0)
|
self.setSimulatedDisconnect(0)
|
||||||
|
|
||||||
|
def uniqueName(self, idString):
|
||||||
|
return ("%s-%s" % (idString, self.uniqueId))
|
||||||
|
|
||||||
class GCTrigger:
|
class GCTrigger:
|
||||||
# used to trigger garbage collection
|
# used to trigger garbage collection
|
||||||
pass
|
pass
|
||||||
|
@ -179,5 +179,6 @@ class TimeManager(DistributedObject.DistributedObject):
|
|||||||
return
|
return
|
||||||
self.notify.info("Giving up on uncertainty requirement.")
|
self.notify.info("Giving up on uncertainty requirement.")
|
||||||
|
|
||||||
messenger.send("gotTimeSync")
|
messenger.send("gotTimeSync", taskChain = 'default')
|
||||||
|
messenger.send(self.cr.uniqueName("gotTimeSync"), taskChain = 'default')
|
||||||
|
|
||||||
|
@ -106,11 +106,11 @@ PUBLISHED:
|
|||||||
void stop_delay();
|
void stop_delay();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool check_datagram();
|
BLOCKING bool check_datagram();
|
||||||
#ifdef HAVE_PYTHON
|
#ifdef HAVE_PYTHON
|
||||||
#ifdef WANT_NATIVE_NET
|
#ifdef WANT_NATIVE_NET
|
||||||
bool check_datagram_ai(PyObject *PycallBackFunction);
|
BLOCKING bool check_datagram_ai(PyObject *PycallBackFunction);
|
||||||
bool network_based_reader_and_yielder(PyObject *PycallBackFunction,ClockObject &clock, float returnBy);
|
BLOCKING bool network_based_reader_and_yielder(PyObject *PycallBackFunction,ClockObject &clock, float returnBy);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -126,7 +126,7 @@ PUBLISHED:
|
|||||||
|
|
||||||
bool is_connected();
|
bool is_connected();
|
||||||
|
|
||||||
bool send_datagram(const Datagram &dg);
|
BLOCKING bool send_datagram(const Datagram &dg);
|
||||||
|
|
||||||
INLINE void set_want_message_bundling(bool flag);
|
INLINE void set_want_message_bundling(bool flag);
|
||||||
INLINE bool get_want_message_bundling() const;
|
INLINE bool get_want_message_bundling() const;
|
||||||
@ -140,8 +140,8 @@ PUBLISHED:
|
|||||||
void abandon_message_bundles();
|
void abandon_message_bundles();
|
||||||
void bundle_msg(const Datagram &dg);
|
void bundle_msg(const Datagram &dg);
|
||||||
|
|
||||||
bool consider_flush();
|
BLOCKING bool consider_flush();
|
||||||
bool flush();
|
BLOCKING bool flush();
|
||||||
|
|
||||||
void disconnect();
|
void disconnect();
|
||||||
void shutdown();
|
void shutdown();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user