Issue #1821 Make grib2 decoding more multithreaded

Former-commit-id: f824e298b6 [formerly f824e298b6 [formerly 4441b32d3ec153a2cf767b8e109c014f9efc3ed8]]
Former-commit-id: cf7d8378dd
Former-commit-id: f61630599f
This commit is contained in:
Ben Steffensmeier 2013-03-25 14:46:48 -05:00
parent cc0debe027
commit 35ecc7cbd2

View file

@ -29,6 +29,7 @@
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* 4/7/09 1994 bphillip Initial Creation * 4/7/09 1994 bphillip Initial Creation
* Mar 25, 2013 1821 bsteffen Make grib2 decoding more multithreaded
* *
* </pre> * </pre>
* *
@ -138,7 +139,9 @@ static PyObject * grib2_getData(PyObject *self, PyObject* args)
long numfields; long numfields;
npy_intp dimSize[1]; npy_intp dimSize[1];
PyObject *response = PyDict_New(); PyObject *response = PyDict_New();
Py_BEGIN_ALLOW_THREADS
numfields = getRecord(fptr, &gfld, recordNumber, fieldNumber, 1); numfields = getRecord(fptr, &gfld, recordNumber, fieldNumber, 1);
Py_END_ALLOW_THREADS
PyObject * numberOfFields = PyInt_FromLong(numfields); PyObject * numberOfFields = PyInt_FromLong(numfields);
PyDict_SetItemString(response, "numFields", numberOfFields); PyDict_SetItemString(response, "numFields", numberOfFields);