Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
processing
is a package for the Python language which supports the
spawning of processes using the API of the standard library's
threading
module. It runs on both Unix and Windows.
Features:
Objects can be transferred between processes using pipes or multi-producer/multi-consumer queues.
Objects can be shared between processes using a server process or (for simple data) shared memory.
Equivalents of all the synchronization primitives in threading
are available.
A Pool
class makes it easy to submit tasks to a pool of worker
processes.
Documentation <http://pyprocessing.berlios.de/doc/index.html>
_Installation instructions <http://pyprocessing.berlios.de/doc/INSTALL.html>
_Changelog <http://pyprocessing.berlios.de/doc/CHANGES.html>
_Acknowledgments <http://pyprocessing.berlios.de/doc/THANKS.html>
_BSD Licence <http://pyprocessing.berlios.de/doc/COPYING.html>
_The project is hosted at
The package can be downloaded from
The processing.Process
class follows the API of threading.Thread
.
For example ::
from processing import Process, Queue
def f(q):
q.put('hello world')
if __name__ == '__main__':
q = Queue()
p = Process(target=f, args=[q])
p.start()
print q.get()
p.join()
Synchronization primitives like locks, semaphores and conditions are available, for example ::
>>> from processing import Condition
>>> c = Condition()
>>> print c
<Condition(<RLock(None, 0)>), 0>
>>> c.acquire()
True
>>> print c
<Condition(<RLock(MainProcess, 1)>), 0>
One can also use a manager to create shared objects either in shared memory or in a server process, for example ::
>>> from processing import Manager
>>> manager = Manager()
>>> l = manager.list(range(10))
>>> l.reverse()
>>> print l
[9, 8, 7, 6, 5, 4, 3, 2, 1, 0]
>>> print repr(l)
<Proxy[list] object at 0x00E1B3B0>
Tasks can be offloaded to a pool of worker processes in various ways, for example ::
>>> from processing import Pool
>>> def f(x): return x*x
...
>>> p = Pool(4)
>>> result = p.mapAsync(f, range(10))
>>> print result.get(timeout=1)
[0, 1, 4, 9, 16, 25, 36, 49, 64, 81]
FAQs
Package for using processes which mimics the threading module
We found that processing demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.