Improved performance when using ImageData methods in multiple threads when ImageData:encode is called

This commit is contained in:
Alex Szpakowski
2013-06-26 03:42:42 -03:00
parent b8efa6372b
commit b04a2fee87
6 changed files with 25 additions and 21 deletions
+1
View File
@@ -202,6 +202,7 @@ int w_ImageData_mapPixel(lua_State *L)
lua_pushvalue(L, 2);
// Manually lock this ImageData's mutex during the entire mapPixel.
// Using the lock methods because lua_error won't trigger object destructors.
mutex->lock();
int ret = lua_pcall(L, 2, 0, 0);
mutex->unlock();