Have a VO GUI app runs lots of things via Dispatch.. but one of those things needs a good hour to run. I do not want wait in current processes for this.. and happy to have background event running. Realise on single thread cannot get this to work..it wants that length job to finish before moving on.
So CreateVOThread and have a function with the work to be done. Thought start this and do other things and that thread will finish.. until needed again.
Can I do this with simple to CreateVOthread with the function and the main thread is processing again. I did not see this.. and confused.
Any help welcome
Have a VO GUI app runs lots of things via Dispatch.. but one of
those things needs a good hour to run. I do not want wait in current processes for this.. and happy to have background event running.
Realise on single thread cannot get this to work.. it wants that
length job to finish before moving on.
So CreateVOThread and have a function with the work to be done.
Thought start this and do other things and that thread will finish..
until needed again.
Can I do this with simple to CreateVOthread with the function and the
main thread is processing again. I did not see this.. and confused.
Any help welcome
Jamal, Wolfgang
Have it working [but it] crashes it seems randomly. I am not sure is DBServer thread safe. I simply want a subset of data, open as
DBSERVER and do some slow process to REST service.
The crash seems relate totally to a field in Dbserver.
Jamal, Wolfgang
Have it working ut in crashes it seems randomly.
I am not sure is DBServer thread safe.
I simply want a subset of data, open as DBSERVER and do some slow
process to REST service. The crash seems relate totally to a field
in Dbserver.
With CreateVOThread is the a requirement to lock memory in a certain
way. Could not find many samples.
Did not want to write another whole service when my system is a
Service. Have not got that far... it crashes in the IDE.
Anybody elese experiences, pointers, gotta yas and frustrations.
Little clues help
Phil
Hi Phil,
the VO development team has confirmed several times that the VO garbage collector is not thread safe.
So, if you use threads, you cannot use dynamically allocated variables
like strings and objects.
The only possibility I see for you is to migrate to X#. Robert has done miracles to make the runtime thread safe, and there every thread has
its own runtime state with its own settings.
So your main thread can have SetDeleted set to on, and one of your
spawned threads can have set it to off. Even the workarea numbers are
per thread.
I can confirm you that the DBServer class in X# is thread safe as I use
it in WPF applications, and they need to be multithreaded to have a responsive GUI.
Wolfgang
Phil McGuinness wrote:
Jamal, Wolfgang
Have it working ut in crashes it seems randomly.
I am not sure is DBServer thread safe.
I simply want a subset of data, open as DBSERVER and do some slow
process to REST service. The crash seems relate totally to a field
in Dbserver.
With CreateVOThread is the a requirement to lock memory in a certain
way. Could not find many samples.
Did not want to write another whole service when my system is a
Service. Have not got that far... it crashes in the IDE.
Anybody elese experiences, pointers, gotta yas and frustrations.
Little clues help
Phil
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 299 |
Nodes: | 16 (2 / 14) |
Uptime: | 54:32:25 |
Calls: | 6,690 |
Files: | 12,225 |
Messages: | 5,344,991 |