Skip to content

Commit f1e160e

Browse files
committed
update
1 parent de8a06b commit f1e160e

File tree

5 files changed

+17
-9
lines changed

5 files changed

+17
-9
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ PureMVC is a lightweight framework for creating applications based upon the clas
1212
pip install PureMVC
1313
```
1414
<!---
15+
Documentation: Update version docs/source/conf.py
16+
Update: python3 -m pip install --upgrade pip
1517
Development: pip install -e .
1618
Testing: pytest test/
1719
Build: python -m build
@@ -36,7 +38,7 @@ index.rst
3638
-->
3739

3840
## Status
39-
Production - [Version 2.0.1](https://github.com/PureMVC/puremvc-python-multicore-framework/blob/master/VERSION)
41+
Production - [Version 2.0.2](https://github.com/PureMVC/puremvc-python-multicore-framework/blob/master/VERSION)
4042

4143
## Platforms / Technologies
4244
* [Python](http://en.wikipedia.org/wiki/Python_(programming_language))

VERSION

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ Release Date: 05/15/25
77
Minor: 1
88
Author: Saad Shams <[email protected]>
99
--------------------------------------------------------------------------
10+
2.0.2 - Map synchronization
11+
2.0.1 - Fix badge for README
1012
2.0.0 - Brand new implementation of ported code, equivalent to AS3 MultiCore Version 1.0.5.
11-
2.0.1 - Fix badge for README

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
copyright = '2025, Saad Shams'
1616
author = 'Saad Shams'
1717

18-
version = '2.0.0'
18+
version = '2.0.2'
1919
release = 'BSD 3-Clause License'
2020

2121
# -- General configuration ---------------------------------------------------

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ classifiers = [
2121
[project.urls]
2222
Homepage = "https://puremvc.org"
2323
Source = "https://github.com/PureMVC/puremvc-python-multicore-framework"
24-
Documentation = "https://puremvc.org/pages/docs/python/multicore"
24+
Documentation = "https://puremvc.org/pages/docs/Python/multicore"

src/puremvc/core/Model.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ def register_proxy(self, proxy: IProxy):
9595
:return: None
9696
"""
9797
proxy.initialize_notifier(self.multitonKey)
98-
self.proxyMap[proxy.proxy_name] = proxy
98+
with self.proxyMapLock:
99+
self.proxyMap[proxy.proxy_name] = proxy
99100
proxy.on_register()
100101

101102
def retrieve_proxy(self, proxy_name: str) -> IProxy:
@@ -107,7 +108,8 @@ def retrieve_proxy(self, proxy_name: str) -> IProxy:
107108
:return: the `IProxy` instance previously registered with the given `proxyName`.
108109
:rtype: IProxy
109110
"""
110-
return self.proxyMap.get(proxy_name)
111+
with self.proxyMapLock:
112+
return self.proxyMap.get(proxy_name)
111113

112114
def has_proxy(self, proxy_name: str) -> bool:
113115
"""
@@ -118,7 +120,8 @@ def has_proxy(self, proxy_name: str) -> bool:
118120
:return: Returns True if the proxy exists in the proxy map, False otherwise.
119121
:rtype: bool
120122
"""
121-
return self.proxyMap.get(proxy_name) is not None
123+
with self.proxyMapLock:
124+
return self.proxyMap.get(proxy_name) is not None
122125

123126
def remove_proxy(self, proxy_name: str) -> IProxy:
124127
"""
@@ -129,9 +132,11 @@ def remove_proxy(self, proxy_name: str) -> IProxy:
129132
:return: the `IProxy` that was removed from the `Model`
130133
:rtype: IProxy
131134
"""
132-
proxy = self.proxyMap.get(proxy_name)
135+
with self.proxyMapLock:
136+
proxy = self.proxyMap.get(proxy_name)
137+
if proxy:
138+
del self.proxyMap[proxy_name]
133139
if proxy:
134-
del self.proxyMap[proxy_name]
135140
proxy.on_remove()
136141
return proxy
137142

0 commit comments

Comments
 (0)