15,909,193 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Zsefv2 (Top 17 by date)
Zsefv2
23-Nov-11 3:28am
View
Its not locked, I have the mechanisms in place to take care of deadlocks. The problem i had before was the main thread was doing the reading of messages that it hangs the UI. nonetheless thanks for replying to my question. ^^
Zsefv2
23-Nov-11 3:25am
View
Ok I put the message processing in the thread and it works better now. I still have to put that silly sleep statement though... by the way, there are several messages. 1 of them comes in at 1Hz while the other at 4Hz i tried sleep(50) only the one sending at 4Hz shows up, i put sleep(500) it works ok, but am missing some messages for the 4Hz, which is not much of a problem but I am curious is there a optimum sleep time to put in my case?
Zsefv2
22-Nov-11 20:44pm
View
i tried that before, the user interface hangs there.
Zsefv2
22-Nov-11 20:41pm
View
ok, i understand, so i should code in such a way that processing of the message is done in the thread while the main thread(mfc) should just receive the message and display only?
Zsefv2
22-Nov-11 10:50am
View
you mean the ReadData is not on the main thread?
Zsefv2
14-Nov-11 9:34am
View
updated the question, i forgot to convert pCharbuff to strString
Zsefv2
31-Oct-11 4:41am
View
Deleted
hey i made the msgblk a global pointer and it works already.
Zsefv2
31-Oct-11 2:51am
View
Deleted
roger that, sorry for the insufficient data
Zsefv2
31-Oct-11 2:43am
View
Deleted
thanks for your answer andrew,
i put in the serial reading timeout and removed the sleep statement and put in some crt check statements (before the delete msgblk and new msgblk). This resulted in the program crashing straight away, just before the delete msgblk at the CRT check.
Zsefv2
31-Oct-11 2:33am
View
Deleted
how do you do that? sending and receiving in a thread
Zsefv2
27-Oct-11 22:31pm
View
thanks for the reply, thats what i did to fix the problem. Totally removed the serial com operations from the GUI thread and put them on the thread I spun.
Zsefv2
26-Oct-11 23:45pm
View
can some kind soul put some code here so i can refer etc?
Zsefv2
26-Oct-11 22:11pm
View
ok, i spin up a thread then suspend it, then when the event of data arrives on the com port, i resume the thread. is that it? then what if another set of data arrives on the com port? the thread would still be running?
Zsefv2
24-Oct-11 8:22am
View
hmmm, let me get you, so in the initialization phase i startup the receive thread then suspend it? so on data arrived i resume it?
what do u mean by letting the thread use WaitCommEvent? are there examples i can follow?
Zsefv2
24-Oct-11 8:20am
View
yeah the mutex was actually it was not there at the beginning... the shared data being the list control?
Zsefv2
19-Sep-11 23:19pm
View
ok thanks...
Zsefv2
19-Sep-11 4:52am
View
how do you actually do this? any links etc to demonstrate?
Show More