Click here to Skip to main content
13,795,145 members

C / C++ / MFC

 
GeneralRe: How to make a c++ executable Pin
Member 1398247130-Sep-18 15:29
memberMember 1398247130-Sep-18 15:29 
GeneralRe: How to make a c++ executable Pin
Richard MacCutchan30-Sep-18 22:06
protectorRichard MacCutchan30-Sep-18 22:06 
AnswerRe: How to make a c++ executable Pin
CPallini30-Sep-18 22:48
mvpCPallini30-Sep-18 22:48 
GeneralRe: How to make a c++ executable Pin
Member 139824711-Oct-18 7:37
memberMember 139824711-Oct-18 7:37 
GeneralRe: How to make a c++ executable Pin
Maximilien1-Oct-18 7:58
memberMaximilien1-Oct-18 7:58 
GeneralRe: How to make a c++ executable Pin
Member 139824711-Oct-18 9:54
memberMember 139824711-Oct-18 9:54 
AnswerRe: How to make a c++ executable Pin
Member 140094495-Oct-18 16:30
memberMember 140094495-Oct-18 16:30 
QuestionAccess a class instance based on its ID Pin
meerokh29-Sep-18 7:50
membermeerokh29-Sep-18 7:50 
I have two queues in my program,queue and waitingQueue. queue contains the workpackage instances that are created by user . After creating a workpackge by a user, if he decides to yield it, i want to change the status of created workpackage to waiting and add it to the waitingQueue. Creation of workpackage returns a unique id of the package that is added to the queue. This is what i want to acheive:

//Done in user application
int packageId = creatpackage(Function, arguments); // this create a package and adds it to a normal queue
wait(packageId); //wait call yeild function that is part of my library

//Inside library
void classname::yeild(int packageId){
   set the state of workpackage to Waiting
   add the package to WaitingQueue
if(there is another package in WaitingQueue)
      Make a switch context to it
else
     Go to normal queue and execute the package
}


My question is how can i access the workpackage state after which yeild function was called. I thought of accessing it based on id somehow(is it even possible??) Based on my full scenario, is there any better approach then what i am doing??
AnswerRe: Access a class instance based on its ID Pin
Richard MacCutchan30-Sep-18 2:55
protectorRichard MacCutchan30-Sep-18 2:55 
GeneralRe: Access a class instance based on its ID Pin
meerokh30-Sep-18 4:52
membermeerokh30-Sep-18 4:52 
GeneralRe: Access a class instance based on its ID Pin
Richard MacCutchan30-Sep-18 5:45
protectorRichard MacCutchan30-Sep-18 5:45 
QuestionCan anyone tell me if c++ is worth learning? Pin
Member 1398247125-Sep-18 5:11
memberMember 1398247125-Sep-18 5:11 
AnswerRe: Can anyone tell me if c++ is worth learning? Pin
Dar Brett25-Sep-18 5:49
memberDar Brett25-Sep-18 5:49 
GeneralRe: Can anyone tell me if c++ is worth learning? Pin
Member 1398247125-Sep-18 6:00
memberMember 1398247125-Sep-18 6:00 
GeneralRe: Can anyone tell me if c++ is worth learning? Pin
Dar Brett25-Sep-18 6:02
memberDar Brett25-Sep-18 6:02 
GeneralRe: Can anyone tell me if c++ is worth learning? Pin
Member 1398247125-Sep-18 6:06
memberMember 1398247125-Sep-18 6:06 
GeneralRe: Can anyone tell me if c++ is worth learning? Pin
Dar Brett25-Sep-18 6:19
memberDar Brett25-Sep-18 6:19 
GeneralRe: Can anyone tell me if c++ is worth learning? Pin
Member 1398247125-Sep-18 6:21
memberMember 1398247125-Sep-18 6:21 
GeneralMessage Closed Pin
8-Oct-18 4:20
memberMrTomDikinson8-Oct-18 4:20 
AnswerRe: Can anyone tell me if c++ is worth learning? Pin
Joe Woodbury25-Sep-18 6:51
professionalJoe Woodbury25-Sep-18 6:51 
AnswerRe: Can anyone tell me if c++ is worth learning? Pin
CPallini25-Sep-18 22:18
mvpCPallini25-Sep-18 22:18 
QuestionCAsynSocket Client Question Pin
ForNow23-Sep-18 5:10
memberForNow23-Sep-18 5:10 
AnswerRe: CAsynSocket Client Question Pin
Richard Andrew x6423-Sep-18 6:37
professionalRichard Andrew x6423-Sep-18 6:37 
GeneralRe: CAsynSocket Client Question Pin
ForNow23-Sep-18 6:43
memberForNow23-Sep-18 6:43 
AnswerRe: CAsynSocket Client Question Pin
Victor Nijegorodov23-Sep-18 9:23
memberVictor Nijegorodov23-Sep-18 9:23 

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.


Advertise | Privacy | Cookies | Terms of Service
Web06 | 2.8.181207.3 | Last Updated 11 Dec 2018
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid