Click here to Skip to main content
13,736,491 members

C / C++ / MFC

 
GeneralRe: How to make a c++ executable Pin
Member 1398247130-Sep-18 14:29
memberMember 1398247130-Sep-18 14:29 
GeneralRe: How to make a c++ executable Pin
Richard MacCutchan30-Sep-18 21:06
protectorRichard MacCutchan30-Sep-18 21:06 
AnswerRe: How to make a c++ executable Pin
CPallini30-Sep-18 21:48
mvpCPallini30-Sep-18 21:48 
GeneralRe: How to make a c++ executable Pin
Member 139824711-Oct-18 6:37
memberMember 139824711-Oct-18 6:37 
GeneralRe: How to make a c++ executable Pin
Maximilien1-Oct-18 6:58
memberMaximilien1-Oct-18 6:58 
GeneralRe: How to make a c++ executable Pin
Member 139824711-Oct-18 8:54
memberMember 139824711-Oct-18 8:54 
AnswerRe: How to make a c++ executable Pin
5-Oct-18 15:30
member5-Oct-18 15:30 
QuestionAccess a class instance based on its ID Pin
meerokh29-Sep-18 6:50
membermeerokh29-Sep-18 6: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 1:55
protectorRichard MacCutchan30-Sep-18 1:55 
GeneralRe: Access a class instance based on its ID Pin
meerokh30-Sep-18 3:52
membermeerokh30-Sep-18 3:52 
GeneralRe: Access a class instance based on its ID Pin
Richard MacCutchan30-Sep-18 4:45
protectorRichard MacCutchan30-Sep-18 4:45 
QuestionCan anyone tell me if c++ is worth learning? Pin
Member 1398247125-Sep-18 4:11
memberMember 1398247125-Sep-18 4:11 
AnswerRe: Can anyone tell me if c++ is worth learning? Pin
Dar Brett25-Sep-18 4:49
memberDar Brett25-Sep-18 4:49 
GeneralRe: Can anyone tell me if c++ is worth learning? Pin
Member 1398247125-Sep-18 5:00
memberMember 1398247125-Sep-18 5:00 
GeneralRe: Can anyone tell me if c++ is worth learning? Pin
Dar Brett25-Sep-18 5:02
memberDar Brett25-Sep-18 5:02 
GeneralRe: Can anyone tell me if c++ is worth learning? Pin
Member 1398247125-Sep-18 5:06
memberMember 1398247125-Sep-18 5:06 
GeneralRe: Can anyone tell me if c++ is worth learning? Pin
Dar Brett25-Sep-18 5:19
memberDar Brett25-Sep-18 5:19 
GeneralRe: Can anyone tell me if c++ is worth learning? Pin
Member 1398247125-Sep-18 5:21
memberMember 1398247125-Sep-18 5:21 
GeneralMessage Closed Pin
8-Oct-18 3:20
memberMrTomDikinson8-Oct-18 3:20 
AnswerRe: Can anyone tell me if c++ is worth learning? Pin
Joe Woodbury25-Sep-18 5:51
professionalJoe Woodbury25-Sep-18 5:51 
AnswerRe: Can anyone tell me if c++ is worth learning? Pin
CPallini25-Sep-18 21:18
mvpCPallini25-Sep-18 21:18 
QuestionCAsynSocket Client Question Pin
ForNow23-Sep-18 4:10
memberForNow23-Sep-18 4:10 
AnswerRe: CAsynSocket Client Question Pin
Richard Andrew x6423-Sep-18 5:37
professionalRichard Andrew x6423-Sep-18 5:37 
GeneralRe: CAsynSocket Client Question Pin
ForNow23-Sep-18 5:43
memberForNow23-Sep-18 5:43 
AnswerRe: CAsynSocket Client Question Pin
Victor Nijegorodov23-Sep-18 8:23
memberVictor Nijegorodov23-Sep-18 8: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
Web01-2016 | 2.8.180920.1 | Last Updated 19 Oct 2018
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid