parfeval with fetch not working
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
HILTON MARQUES SANTANA
el 12 de Jul. de 2022
Editada: HILTON MARQUES SANTANA
el 14 de Jul. de 2022
Hello guys. When I call the fetch() function with parfeval, I get the following error:
parfeval(@fetch,1,database,query)
Error: 'Dot indexing is not supported for variables of this type.'
On the other hand, without parfeval, the function works perfectly. What could it be?
0 comentarios
Respuesta aceptada
Edric Ellis
el 13 de Jul. de 2022
You cannot pass database connection objects to workers directly like this. You should use createConnectionForPool . There are examples on that doc page that show you how to set up and use this. You'll end up with something like this:
c = createConnectionForPool(..);
% Wrap the call to "fetch" to unpick the .Value out of the pool connection
% object 'c'.
fut = parfeval(@(c, varargin) fetch(c.Value, varargin{:}), 1, c, query)
1 comentario
Más respuestas (0)
Ver también
Categorías
Más información sobre Background Processing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!