Click here to Skip to main content
15,890,043 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: WM_DESTROY Pin
Rajesh R Subramanian27-Apr-07 19:28
professionalRajesh R Subramanian27-Apr-07 19:28 
AnswerRe: WM_DESTROY Pin
Stephen Hewitt27-Apr-07 20:49
Stephen Hewitt27-Apr-07 20:49 
AnswerRe: WM_DESTROY Pin
Michael Dunn28-Apr-07 18:50
sitebuilderMichael Dunn28-Apr-07 18:50 
QuestionFile Pin
Tran Ngoc Minh27-Apr-07 17:31
Tran Ngoc Minh27-Apr-07 17:31 
AnswerRe: File Pin
Hamid_RT27-Apr-07 18:45
Hamid_RT27-Apr-07 18:45 
AnswerRe: File Pin
vivekphlp27-Apr-07 18:52
vivekphlp27-Apr-07 18:52 
QuestionQuestion about Interlocked functions Pin
HOW WHAT27-Apr-07 17:29
HOW WHAT27-Apr-07 17:29 
AnswerRe: Question about Interlocked functions Pin
Arman S.27-Apr-07 22:49
Arman S.27-Apr-07 22:49 
1. Why Interlocked functions not have only-read operating funciton?

This is almost meaningless to have such a function. Why? Because
1) Reading is itself not an issue of concurrent accesses (I mean if you only read, you will have no problems)
2) You still can simulate it by those interlocked functions.

2.Interlocked function working at value A, at the same time other thread a function read value A, who first pass?

No one knows. This is impossible to state this or that thread will access the same resource first if they try it concurrently.

If i want fist read operation then write operation, how to do?

Then you have to use some synchronization between the reading and writting threads. Here would be appropriate the usage of Events. See here[^] for more details.


3.example 1:
more thread1 run, but i want only and only run first thread1 can do (1) until ReWork function run. Can those code good work?

Again a synchronization job. Refer to the article cited above.


--
=====
Arman

AnswerRe: Question about Interlocked functions Pin
cmk28-Apr-07 13:23
cmk28-Apr-07 13:23 
GeneralRe: Question about Interlocked functions Pin
HOW WHAT28-Apr-07 14:47
HOW WHAT28-Apr-07 14:47 
GeneralRe: Question about Interlocked functions Pin
cmk28-Apr-07 15:20
cmk28-Apr-07 15:20 
GeneralRe: Question about Interlocked functions Pin
HOW WHAT28-Apr-07 22:21
HOW WHAT28-Apr-07 22:21 
GeneralRe: Question about Interlocked functions Pin
cmk29-Apr-07 0:14
cmk29-Apr-07 0:14 
GeneralRe: Question about Interlocked functions Pin
HOW WHAT29-Apr-07 4:33
HOW WHAT29-Apr-07 4:33 
GeneralRe: Question about Interlocked functions Pin
cmk29-Apr-07 9:13
cmk29-Apr-07 9:13 
GeneralRe: Question about Interlocked functions Pin
HOW WHAT29-Apr-07 20:05
HOW WHAT29-Apr-07 20:05 
GeneralRe: Question about Interlocked functions Pin
HOW WHAT28-Apr-07 22:48
HOW WHAT28-Apr-07 22:48 
GeneralRe: Question about Interlocked functions Pin
cmk29-Apr-07 0:01
cmk29-Apr-07 0:01 
GeneralRe: Question about Interlocked functions Pin
HOW WHAT29-Apr-07 2:49
HOW WHAT29-Apr-07 2:49 
GeneralRe: Question about Interlocked functions Pin
cmk29-Apr-07 9:04
cmk29-Apr-07 9:04 
Questionhow to make very large numbers Pin
g3RC4n27-Apr-07 15:43
g3RC4n27-Apr-07 15:43 
AnswerRe: how to make very large numbers Pin
David Crow27-Apr-07 17:02
David Crow27-Apr-07 17:02 
GeneralRe: how to make very large numbers Pin
Rajesh R Subramanian27-Apr-07 19:31
professionalRajesh R Subramanian27-Apr-07 19:31 
GeneralRe: how to make very large numbers Pin
g3RC4n27-Apr-07 23:11
g3RC4n27-Apr-07 23:11 
GeneralRe: how to make very large numbers Pin
cp987628-Apr-07 0:21
cp987628-Apr-07 0:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.