Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
5053fbbb
Kaydet (Commit)
5053fbbb
authored
Nis 02, 2009
tarafından
Jesse Noller
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue 3551: Raise ValueError if the size causes ERROR_NO_SYSTEM_RESOURCES
üst
238cedcd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
4 deletions
+21
-4
multiprocessing.rst
Doc/library/multiprocessing.rst
+5
-2
NEWS
Misc/NEWS
+4
-0
connection.h
Modules/_multiprocessing/connection.h
+6
-2
pipe_connection.c
Modules/_multiprocessing/pipe_connection.c
+6
-0
No files found.
Doc/library/multiprocessing.rst
Dosyayı görüntüle @
5053fbbb
...
@@ -710,7 +710,8 @@ Connection objects usually created using :func:`Pipe` -- see also
...
@@ -710,7 +710,8 @@ Connection objects usually created using :func:`Pipe` -- see also
Send
an
object
to
the
other
end
of
the
connection
which
should
be
read
Send
an
object
to
the
other
end
of
the
connection
which
should
be
read
using
:
meth
:`
recv
`.
using
:
meth
:`
recv
`.
The
object
must
be
picklable
.
The
object
must
be
picklable
.
Very
large
pickles
(
approximately
32
MB
+,
though
it
depends
on
the
OS
)
may
raise
a
ValueError
exception
.
..
method
::
recv
()
..
method
::
recv
()
...
@@ -742,7 +743,9 @@ Connection objects usually created using :func:`Pipe` -- see also
...
@@ -742,7 +743,9 @@ Connection objects usually created using :func:`Pipe` -- see also
complete
message
.
complete
message
.
If
*
offset
*
is
given
then
data
is
read
from
that
position
in
*
buffer
*.
If
If
*
offset
*
is
given
then
data
is
read
from
that
position
in
*
buffer
*.
If
*
size
*
is
given
then
that
many
bytes
will
be
read
from
buffer
.
*
size
*
is
given
then
that
many
bytes
will
be
read
from
buffer
.
Very
large
buffers
(
approximately
32
MB
+,
though
it
depends
on
the
OS
)
may
raise
a
ValueError
exception
..
method
::
recv_bytes
([
maxlength
])
..
method
::
recv_bytes
([
maxlength
])
...
...
Misc/NEWS
Dosyayı görüntüle @
5053fbbb
...
@@ -202,6 +202,10 @@ Core and Builtins
...
@@ -202,6 +202,10 @@ Core and Builtins
Library
Library
-------
-------
- Issue 3551: Patch multiprocessing to raise a proper exception if the size of the
object when writefile is called causes a ERROR_NO_SYSTEM_RESOURCES. Added docs
to note the limitation
- unittest.assertNotEqual() now uses the inequality operator (!=) instead
- unittest.assertNotEqual() now uses the inequality operator (!=) instead
of the equality operator.
of the equality operator.
...
...
Modules/_multiprocessing/connection.h
Dosyayı görüntüle @
5053fbbb
...
@@ -131,8 +131,12 @@ connection_sendbytes(ConnectionObject *self, PyObject *args)
...
@@ -131,8 +131,12 @@ connection_sendbytes(ConnectionObject *self, PyObject *args)
res
=
conn_send_string
(
self
,
buffer
+
offset
,
size
);
res
=
conn_send_string
(
self
,
buffer
+
offset
,
size
);
if
(
res
<
0
)
if
(
res
<
0
)
{
return
mp_SetError
(
PyExc_IOError
,
res
);
if
(
PyErr_Occurred
())
return
NULL
;
else
return
mp_SetError
(
PyExc_IOError
,
res
);
}
Py_RETURN_NONE
;
Py_RETURN_NONE
;
}
}
...
...
Modules/_multiprocessing/pipe_connection.c
Dosyayı görüntüle @
5053fbbb
...
@@ -23,6 +23,12 @@ conn_send_string(ConnectionObject *conn, char *string, size_t length)
...
@@ -23,6 +23,12 @@ conn_send_string(ConnectionObject *conn, char *string, size_t length)
Py_BEGIN_ALLOW_THREADS
Py_BEGIN_ALLOW_THREADS
ret
=
WriteFile
(
conn
->
handle
,
string
,
length
,
&
amount_written
,
NULL
);
ret
=
WriteFile
(
conn
->
handle
,
string
,
length
,
&
amount_written
,
NULL
);
Py_END_ALLOW_THREADS
Py_END_ALLOW_THREADS
if
(
ret
==
0
&&
GetLastError
()
==
ERROR_NO_SYSTEM_RESOURCES
)
{
PyErr_Format
(
PyExc_ValueError
,
"Cannnot send %"
PY_FORMAT_SIZE_T
"d bytes over connection"
,
length
);
return
MP_STANDARD_ERROR
;
}
return
ret
?
MP_SUCCESS
:
MP_STANDARD_ERROR
;
return
ret
?
MP_SUCCESS
:
MP_STANDARD_ERROR
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment