salabim 25.0.7__py3-none-any.whl → 25.0.9__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
salabim/salabim.py CHANGED
@@ -1,13 +1,13 @@
1
- # _ _ _ ____ ____ ___ _____
2
- # ___ __ _ | | __ _ | |__ (_) _ __ ___ |___ \ | ___| / _ \ |___ |
3
- # / __| / _` || | / _` || '_ \ | || '_ ` _ \ __) ||___ \ | | | | / /
4
- # \__ \| (_| || || (_| || |_) || || | | | | | / __/ ___) | _ | |_| | _ / /
5
- # |___/ \__,_||_| \__,_||_.__/ |_||_| |_| |_| |_____||____/ (_) \___/ (_) /_/
1
+ # _ _ _ ____ ____ ___ ___
2
+ # ___ __ _ | | __ _ | |__ (_) _ __ ___ |___ \ | ___| / _ \ / _ \
3
+ # / __| / _` || | / _` || '_ \ | || '_ ` _ \ __) ||___ \ | | | | | (_) |
4
+ # \__ \| (_| || || (_| || |_) || || | | | | | / __/ ___) | _ | |_| | _ \__, |
5
+ # |___/ \__,_||_| \__,_||_.__/ |_||_| |_| |_| |_____||____/ (_) \___/ (_) /_/
6
6
  # discrete event simulation
7
7
  #
8
8
  # see www.salabim.org for more information, the documentation and license information
9
9
 
10
- __version__ = "25.0.7"
10
+ __version__ = "25.0.9"
11
11
  import heapq
12
12
  import random
13
13
  import time
@@ -7263,7 +7263,6 @@ by adding at the end:
7263
7263
  self.status._value = scheduled
7264
7264
  if self.env._yieldless:
7265
7265
  self._glet = greenlet.greenlet(lambda: self._process(**kwargs_p), parent=self.env._glet)
7266
- self.env.glets.append(self._glet)
7267
7266
  self._reschedule(scheduled_time, priority, urgent, "activate", cap_now, extra=extra)
7268
7267
  self.setup(**kwargs)
7269
7268
 
@@ -7503,13 +7502,14 @@ by adding at the end:
7503
7502
  return return_or_print(result, as_str, file)
7504
7503
 
7505
7504
  def _push(self, t, priority, urgent, return_value=None, switch=True):
7506
- self.env._seq += 1
7507
- if urgent:
7508
- seq = -self.env._seq
7509
- else:
7510
- seq = self.env._seq
7511
- self._on_event_list = True
7512
- heapq.heappush(self.env._event_list, (t, priority, seq, self, return_value))
7505
+ if t!=inf:
7506
+ self.env._seq += 1
7507
+ if urgent:
7508
+ seq = -self.env._seq
7509
+ else:
7510
+ seq = self.env._seq
7511
+ self._on_event_list = True
7512
+ heapq.heappush(self.env._event_list, (t, priority, seq, self, return_value))
7513
7513
  if self.env._yieldless:
7514
7514
  if self is self.env._current_component:
7515
7515
  self.env._glet.switch()
@@ -7937,7 +7937,6 @@ by adding:
7937
7937
  lineno = self.lineno_txt(add_at=True)
7938
7938
  self.env.print_trace("", "", self.name() + " passivate", merge_blanks(lineno, self._modetxt()))
7939
7939
  self.status._value = passive
7940
- self._push(inf, 0, False, None)
7941
7940
 
7942
7941
  if self.env._yieldless:
7943
7942
  if self is self.env._current_component:
@@ -8079,8 +8078,6 @@ by adding:
8079
8078
  self.env.print_trace("", "", "cancel " + self.name() + " " + self._modetxt())
8080
8079
  self.status._value = data
8081
8080
  if self.env._yieldless:
8082
- self._glet.throw()
8083
- self._glet = None
8084
8081
  if self is self.env._current_component:
8085
8082
  self.env._glet.switch()
8086
8083
 
@@ -10560,7 +10557,6 @@ class Environment:
10560
10557
  ):
10561
10558
  _check_overlapping_parameters(self, "__init__", "setup")
10562
10559
 
10563
- self.glets = []
10564
10560
  if name is None:
10565
10561
  if isdefault_env:
10566
10562
  name = "default environment"
@@ -10743,10 +10739,6 @@ class Environment:
10743
10739
  """
10744
10740
  pass
10745
10741
 
10746
- def cancel_all(self):
10747
- for t, priority, sequence, comp, return_value in self._event_list:
10748
- comp.cancel()
10749
-
10750
10742
  def serialize(self) -> int:
10751
10743
  self.serial += 1
10752
10744
  return self.serial
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: salabim
3
- Version: 25.0.7
3
+ Version: 25.0.9
4
4
  Summary: salabim - discrete event simulation in Python
5
5
  Author-email: Ruud van der Ham <rt.van.der.ham@gmail.com>
6
6
  Project-URL: Homepage, https://salabim.org
@@ -3,8 +3,8 @@ salabim/LICENSE.txt,sha256=eTPlcDJz4G0096Qv-wfMjm1Wxbd4ilDlsYg5rN4HjWQ,1106
3
3
  salabim/__init__.py,sha256=r7qPLvlmX0dkZDyjuTo8Jo3ex3sD1L4pmK6K5ib9vyw,56
4
4
  salabim/calibri.ttf,sha256=RWpf8Uo31RfvGGNaSt9-2sXSuN87AVE_NFMRsV3LhBk,1330156
5
5
  salabim/mplus-1m-regular.ttf,sha256=EuFHr90BJjuAn_r5MleJFN-WfkeWJ4tf7DweI5zr8tU,289812
6
- salabim/salabim.py,sha256=fPJt1KQCzcKvY1zxVVsaZMWumB9KCUa03SySJaMYwoE,1125723
7
- salabim-25.0.7.dist-info/METADATA,sha256=ETRykdUqh-or7N6LKOHNYFV_FXhwa0QmCFYJx4jKPgI,3399
8
- salabim-25.0.7.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
9
- salabim-25.0.7.dist-info/top_level.txt,sha256=UE6zVlbi3F6T5ma1a_5TrojMaF21GYKDt9svvm0U4cQ,8
10
- salabim-25.0.7.dist-info/RECORD,,
6
+ salabim/salabim.py,sha256=vSMVcWlHrZKShotu15QJ_THLqTUbheGw5gsLnoDhca0,1125470
7
+ salabim-25.0.9.dist-info/METADATA,sha256=cJClhCPVdf31-iu49ZJwLmP1u43l6MFBUZBesLrf92s,3399
8
+ salabim-25.0.9.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
9
+ salabim-25.0.9.dist-info/top_level.txt,sha256=UE6zVlbi3F6T5ma1a_5TrojMaF21GYKDt9svvm0U4cQ,8
10
+ salabim-25.0.9.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (76.1.0)
2
+ Generator: setuptools (78.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5