Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #4609 > unrolled thread
| Started by | serggio2011@gmail.com |
|---|---|
| First post | 2013-01-18 11:08 -0800 |
| Last post | 2013-01-28 10:25 -0500 |
| Articles | 12 — 6 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
Thread-safe garbage collector serggio2011@gmail.com - 2013-01-18 11:08 -0800
Re: Thread-safe garbage collector "Valery N." <mustangsoftcom@gmail.com> - 2013-01-18 13:54 -0800
Re: Thread-safe garbage collector "Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it> - 2013-01-21 18:30 +0100
Re: Thread-safe garbage collector serggio2011@gmail.com - 2013-01-24 07:57 -0800
Re: Thread-safe garbage collector "Ginny Caughey" <gcaughey@online.hotmail.com> - 2013-01-25 09:48 -0500
Re: Thread-safe garbage collector "Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it> - 2013-01-25 18:40 +0100
Re: Thread-safe garbage collector "Ginny Caughey" <gcaughey@online.hotmail.com> - 2013-01-26 07:48 -0500
Re: Thread-safe garbage collector "Valery N." <mustangsoftcom@gmail.com> - 2013-01-27 07:34 -0800
Re: Thread-safe garbage collector "Jamal" <vodotnet_nospam@yahoo.com> - 2013-01-25 15:23 -0500
Re: Thread-safe garbage collector "Dirk (Belgium)" <dirk.dot.herijgers@pbprojects.dot.be> - 2013-01-28 08:50 +0000
Re: Thread-safe garbage collector serggio2011@gmail.com - 2013-01-28 03:43 -0800
Re: Thread-safe garbage collector "Jamal" <vodotnet_nospam@yahoo.com> - 2013-01-28 10:25 -0500
| From | serggio2011@gmail.com |
|---|---|
| Date | 2013-01-18 11:08 -0800 |
| Subject | Thread-safe garbage collector |
| Message-ID | <ca4c37d9-767f-4710-98cf-c8c8c9238e73@googlegroups.com> |
Well, it had been widely and numerously discussed that GC is not thread-safe and one should avoid using dynamic objects when dealing with multiple threads. And you know that's very-very uncomfortable :( . Sure, one may use OldSpace, some static "memalloc"-based constructions, etc. But that's not a way out in most cases. There's quite a common practice to involve multithreading as an extension to existing functionality, so preserving the majority of code is unevitable. Are there any plans to make a THREAD-SAFE GC IN SP5 ? Please don't say me about Vulcan. It's not so easy to move, when you have project (*.VOA + *.IDX files) sized 1.7Gb.
[toc] | [next] | [standalone]
| From | "Valery N." <mustangsoftcom@gmail.com> |
|---|---|
| Date | 2013-01-18 13:54 -0800 |
| Message-ID | <7c33037e-7fc7-4dfc-8448-8b8282939c9e@g6g2000vbk.googlegroups.com> |
| In reply to | #4609 |
Your letter with an example I received. The example corrected. Errors - No. I sent you the letter with a corrected example. Good Luck! Valery Novossiolov.
[toc] | [prev] | [next] | [standalone]
| From | "Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it> |
|---|---|
| Date | 2013-01-21 18:30 +0100 |
| Message-ID | <kdju0j$n33$1@dont-email.me> |
| In reply to | #4609 |
Hello Serggio, I believe that it depends much on the classes/functions you want to use and it does not depend on the GC directly. GUI for example should never be used for Threads, only the main thread must have the right to communicate with the GUI. There are also limitations accessing databases (DBF, SQL), so it may depend more on these circumstances. I have seen colleagues having trouble also with C# multi threading. So it is not only the programming language but understanding threads in general. Arne Ortlinghaus <serggio2011@gmail.com> schrieb im Newsbeitrag news:ca4c37d9-767f-4710-98cf-c8c8c9238e73@googlegroups.com... Well, it had been widely and numerously discussed that GC is not thread-safe and one should avoid using dynamic objects when dealing with multiple threads. And you know that's very-very uncomfortable :( . Sure, one may use OldSpace, some static "memalloc"-based constructions, etc. But that's not a way out in most cases. There's quite a common practice to involve multithreading as an extension to existing functionality, so preserving the majority of code is unevitable. Are there any plans to make a THREAD-SAFE GC IN SP5 ? Please don't say me about Vulcan. It's not so easy to move, when you have project (*.VOA + *.IDX files) sized 1.7Gb.
[toc] | [prev] | [next] | [standalone]
| From | serggio2011@gmail.com |
|---|---|
| Date | 2013-01-24 07:57 -0800 |
| Message-ID | <79dfed67-ce5b-43d7-8ffb-3307526790ce@googlegroups.com> |
| In reply to | #4622 |
Arne, experience in thread-safe programming is a basic axiom. I do not even argue about it. I'm just saying that GC is not designed well enough to be thread-safe. Let me cite some paragraphs from CAVO's help: ------------------------------ When multiple threads are running, each dynamic memory pointer becomes a shared resource. One thread might load a pointer to a string into a register. (The GC can only update memory locations, not registers.) Before actually performing an operation with that pointer, execution is transferred to another thread that triggers the GC. Now the string referred to by the register in the first thread is moved, and when execution returns to the first thread, the pointer in the register is not valid anymore. The problem described above WILL BE RESOLVED IN A FUTURE RELEASE of Visual Objects, but right now the programmer has to be aware of it. ------------------------------ So I'm just asking, when that "future release" is going to be released ? :)
[toc] | [prev] | [next] | [standalone]
| From | "Ginny Caughey" <gcaughey@online.hotmail.com> |
|---|---|
| Date | 2013-01-25 09:48 -0500 |
| Message-ID | <51029b3b$0$63311$c3e8da3$3a1a2348@news.astraweb.com> |
| In reply to | #4654 |
That sounds like a documentation error. In any case, and on any platform, you need to design your app for what is available today. Ginny wrote in message news:79dfed67-ce5b-43d7-8ffb-3307526790ce@googlegroups.com... Arne, experience in thread-safe programming is a basic axiom. I do not even argue about it. I'm just saying that GC is not designed well enough to be thread-safe. Let me cite some paragraphs from CAVO's help: ------------------------------ When multiple threads are running, each dynamic memory pointer becomes a shared resource. One thread might load a pointer to a string into a register. (The GC can only update memory locations, not registers.) Before actually performing an operation with that pointer, execution is transferred to another thread that triggers the GC. Now the string referred to by the register in the first thread is moved, and when execution returns to the first thread, the pointer in the register is not valid anymore. The problem described above WILL BE RESOLVED IN A FUTURE RELEASE of Visual Objects, but right now the programmer has to be aware of it. ------------------------------ So I'm just asking, when that "future release" is going to be released ? :)
[toc] | [prev] | [next] | [standalone]
| From | "Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it> |
|---|---|
| Date | 2013-01-25 18:40 +0100 |
| Message-ID | <kdug1k$sm$1@dont-email.me> |
| In reply to | #4654 |
Hello Serggio, I would say that if you use entercriticalsecion and leavecriticalsection (or similar) in your program parts then it should be also possible to make thread safe programs. In any case it depends much on the ressorces used. The ODBC drivers I am using have an explicit setting "Multithreaded application" that must be set and where the manufactorer says that there is a "small" performance difference when setting the switch. There is another possibility of "multithreading" I am using: Multiple exe files partly hidden that communicate via posting messages and database changes. There is the nice Windows message WM_COPYDATA with which also long commands and answers can be transferred between two applications. It is important to use postmessage and not sendmessage. Arne Ortlinghaus <serggio2011@gmail.com> schrieb im Newsbeitrag news:79dfed67-ce5b-43d7-8ffb-3307526790ce@googlegroups.com... Arne, experience in thread-safe programming is a basic axiom. I do not even argue about it. I'm just saying that GC is not designed well enough to be thread-safe. Let me cite some paragraphs from CAVO's help: ------------------------------ When multiple threads are running, each dynamic memory pointer becomes a shared resource. One thread might load a pointer to a string into a register. (The GC can only update memory locations, not registers.) Before actually performing an operation with that pointer, execution is transferred to another thread that triggers the GC. Now the string referred to by the register in the first thread is moved, and when execution returns to the first thread, the pointer in the register is not valid anymore. The problem described above WILL BE RESOLVED IN A FUTURE RELEASE of Visual Objects, but right now the programmer has to be aware of it. ------------------------------ So I'm just asking, when that "future release" is going to be released ? :)
[toc] | [prev] | [next] | [standalone]
| From | "Ginny Caughey" <gcaughey@online.hotmail.com> |
|---|---|
| Date | 2013-01-26 07:48 -0500 |
| Message-ID | <5103d07d$0$63268$c3e8da3$3a1a2348@news.astraweb.com> |
| In reply to | #4656 |
Great tips, Arne. I especially like the pseudo-multithreading using PostMessage. Ginny "Arne Ortlinghaus" wrote in message news:kdug1k$sm$1@dont-email.me... Hello Serggio, I would say that if you use entercriticalsecion and leavecriticalsection (or similar) in your program parts then it should be also possible to make thread safe programs. In any case it depends much on the ressorces used. The ODBC drivers I am using have an explicit setting "Multithreaded application" that must be set and where the manufactorer says that there is a "small" performance difference when setting the switch. There is another possibility of "multithreading" I am using: Multiple exe files partly hidden that communicate via posting messages and database changes. There is the nice Windows message WM_COPYDATA with which also long commands and answers can be transferred between two applications. It is important to use postmessage and not sendmessage. Arne Ortlinghaus <serggio2011@gmail.com> schrieb im Newsbeitrag news:79dfed67-ce5b-43d7-8ffb-3307526790ce@googlegroups.com... Arne, experience in thread-safe programming is a basic axiom. I do not even argue about it. I'm just saying that GC is not designed well enough to be thread-safe. Let me cite some paragraphs from CAVO's help: ------------------------------ When multiple threads are running, each dynamic memory pointer becomes a shared resource. One thread might load a pointer to a string into a register. (The GC can only update memory locations, not registers.) Before actually performing an operation with that pointer, execution is transferred to another thread that triggers the GC. Now the string referred to by the register in the first thread is moved, and when execution returns to the first thread, the pointer in the register is not valid anymore. The problem described above WILL BE RESOLVED IN A FUTURE RELEASE of Visual Objects, but right now the programmer has to be aware of it. ------------------------------ So I'm just asking, when that "future release" is going to be released ? :)
[toc] | [prev] | [next] | [standalone]
| From | "Valery N." <mustangsoftcom@gmail.com> |
|---|---|
| Date | 2013-01-27 07:34 -0800 |
| Message-ID | <c5424a79-1341-4551-aee2-959d83cf6a53@v7g2000yqv.googlegroups.com> |
| In reply to | #4654 |
I sent the letter with one more way of the solution of a task.
[toc] | [prev] | [next] | [standalone]
| From | "Jamal" <vodotnet_nospam@yahoo.com> |
|---|---|
| Date | 2013-01-25 15:23 -0500 |
| Message-ID | <ke4ul6$k4g$2@dont-email.me> |
| In reply to | #4654 |
Yet in another part of the VO help it says: "Note: The kernel runtime support (garbage collector) has been made thread-safe in this version of Visual Objects, easing the development of multithreaded applications. Thread support is a basic requisite for building server components, such as ISAPI extensions or components running in an application server framework. For an example of multithreading, see the Multithreaded Standard MDI Application, which is accessible from the Samples tab page of the Application Gallery." Jamal wrote in message news:79dfed67-ce5b-43d7-8ffb-3307526790ce@googlegroups.com... Arne, experience in thread-safe programming is a basic axiom. I do not even argue about it. I'm just saying that GC is not designed well enough to be thread-safe. Let me cite some paragraphs from CAVO's help: ------------------------------ When multiple threads are running, each dynamic memory pointer becomes a shared resource. One thread might load a pointer to a string into a register. (The GC can only update memory locations, not registers.) Before actually performing an operation with that pointer, execution is transferred to another thread that triggers the GC. Now the string referred to by the register in the first thread is moved, and when execution returns to the first thread, the pointer in the register is not valid anymore. The problem described above WILL BE RESOLVED IN A FUTURE RELEASE of Visual Objects, but right now the programmer has to be aware of it. ------------------------------ So I'm just asking, when that "future release" is going to be released ? :)
[toc] | [prev] | [next] | [standalone]
| From | "Dirk (Belgium)" <dirk.dot.herijgers@pbprojects.dot.be> |
|---|---|
| Date | 2013-01-28 08:50 +0000 |
| Message-ID | <ke5e4k$toq$1@dont-email.me> |
| In reply to | #4665 |
Jamal, In which version of the help file is this written? VO 2.5 ? VO 2.6 ? VO 2.7 ? VO 2.8 ? Dirk ================ Jamal wrote: > Yet in another part of the VO help it says: > > "Note: The kernel runtime support (garbage collector) has been made > thread-safe in this version of Visual Objects, easing the development > of multithreaded applications. Thread support is a basic requisite > for building server components, such as ISAPI extensions or > components running in an application server framework. For an > example of multithreading, see the Multithreaded Standard MDI > Application, which is accessible from the Samples tab page of the > Application Gallery." > > Jamal > > wrote in message > news:79dfed67-ce5b-43d7-8ffb-3307526790ce@googlegroups.com... > > Arne, experience in thread-safe programming is a basic axiom. I do > not even argue about it. I'm just saying that GC is not designed well > enough to be thread-safe. Let me cite some paragraphs from CAVO's > help: > > ------------------------------ > When multiple threads are running, each dynamic memory pointer > becomes a shared resource. One thread might load a pointer to a > string into a register. (The GC can only update memory locations, not > registers.) Before actually performing an operation with that > pointer, execution is transferred to another thread that triggers the > GC. Now the string referred to by the register in the first thread is > moved, and when execution returns to the first thread, the pointer in > the register is not valid anymore. > > The problem described above WILL BE RESOLVED IN A FUTURE RELEASE of > Visual Objects, but right now the programmer has to be aware of it. > ------------------------------ > > So I'm just asking, when that "future release" is going to be > released ? :) --
[toc] | [prev] | [next] | [standalone]
| From | serggio2011@gmail.com |
|---|---|
| Date | 2013-01-28 03:43 -0800 |
| Message-ID | <29ab9835-156b-4494-b0b0-714dec2929b6@googlegroups.com> |
| In reply to | #4670 |
Dirk, that's written in the help for VO 2.8. And that's a rather optimistic statement and in fact it is just untrue. There's a sample multithreaded MDI application in the "samples" directory "\Samples\WinSDK\MThread\Mtstdapp.aef" intended to justify that statement. And it is really quite stable when there are several threads but... hangs or falls when there are 10-15 threads. Perhaps it's just the time to call gc :)
[toc] | [prev] | [next] | [standalone]
| From | "Jamal" <vodotnet_nospam@yahoo.com> |
|---|---|
| Date | 2013-01-28 10:25 -0500 |
| Message-ID | <ke6592$5ik$1@dont-email.me> |
| In reply to | #4670 |
Dirk, It am using 2.8 (sp4) but I don't know what version exactly that statement was added in. Jamal "Dirk (Belgium)" wrote in message news:ke5e4k$toq$1@dont-email.me... Jamal, In which version of the help file is this written? VO 2.5 ? VO 2.6 ? VO 2.7 ? VO 2.8 ? Dirk ================ Jamal wrote: > Yet in another part of the VO help it says: > > "Note: The kernel runtime support (garbage collector) has been made > thread-safe in this version of Visual Objects, easing the development > of multithreaded applications. Thread support is a basic requisite > for building server components, such as ISAPI extensions or > components running in an application server framework. For an > example of multithreading, see the Multithreaded Standard MDI > Application, which is accessible from the Samples tab page of the > Application Gallery." > > Jamal > > wrote in message > news:79dfed67-ce5b-43d7-8ffb-3307526790ce@googlegroups.com... > > Arne, experience in thread-safe programming is a basic axiom. I do > not even argue about it. I'm just saying that GC is not designed well > enough to be thread-safe. Let me cite some paragraphs from CAVO's > help: > > ------------------------------ > When multiple threads are running, each dynamic memory pointer > becomes a shared resource. One thread might load a pointer to a > string into a register. (The GC can only update memory locations, not > registers.) Before actually performing an operation with that > pointer, execution is transferred to another thread that triggers the > GC. Now the string referred to by the register in the first thread is > moved, and when execution returns to the first thread, the pointer in > the register is not valid anymore. > > The problem described above WILL BE RESOLVED IN A FUTURE RELEASE of > Visual Objects, but right now the programmer has to be aware of it. > ------------------------------ > > So I'm just asking, when that "future release" is going to be > released ? :) --
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web