This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2012年05月29日 14:59 by sbt, last changed 2022年04月11日 14:57 by admin.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| memoryview-array-value.patch | sbt, 2012年05月29日 14:59 | review | ||
| memoryview-array-value.patch | sbt, 2014年07月08日 15:12 | review | ||
| Messages (3) | |||
|---|---|---|---|
| msg161892 - (view) | Author: Richard Oudkerk (sbt) * (Python committer) | Date: 2012年05月29日 14:59 | |
The attached patch enables creation of shared objects allocated from shared memory using memoryview objects instead of ctypes.
This enables the use of shared memory on systems where ctypes is unavailable.
The new functions/classes RawArray, RawValue, Array and Array have been added to multiprocessing.heap. They are almost equivalent to the functions/classes of the same name in multiprocessing and multiprocessing.sharedctypes when a letter typecode is used (rather than a ctypes type).
The differences in behaviour are due to the differences between memoryview objects and ctypes arrays. The most noticeable is the fact that you can't set a slice using an arbitrary sequence, so
arr = multiprocessing.RawArray('i', [0]*10)
arr[:3] = [1,2,3]
has to be rewritten to something like
arr = multiprocessing.heap.RawArray('i', [0]*10)
arr[:3] = array.array('i', [1,2,3])
(No documetation yet.)
|
|||
| msg222133 - (view) | Author: Mark Lawrence (BreamoreBoy) * | Date: 2014年07月02日 21:40 | |
@Richard I assume that you'll be following this up. |
|||
| msg222567 - (view) | Author: Richard Oudkerk (sbt) * (Python committer) | Date: 2014年07月08日 15:12 | |
Updated version of the patch. Still needs docs. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:31 | admin | set | github: 59158 |
| 2019年04月26日 17:21:56 | BreamoreBoy | set | nosy:
- BreamoreBoy |
| 2015年01月16日 08:31:28 | pitrou | set | nosy:
+ davin |
| 2014年07月08日 15:12:08 | sbt | set | files:
+ memoryview-array-value.patch messages: + msg222567 |
| 2014年07月02日 21:40:05 | BreamoreBoy | set | nosy:
+ BreamoreBoy messages: + msg222133 versions: + Python 3.5, - Python 3.3 |
| 2012年06月05日 22:12:11 | pitrou | set | nosy:
+ pitrou, neologix |
| 2012年05月29日 14:59:42 | sbt | create | |