16,018,092 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 .NET 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 ve3tru (Top 11 by date)
ve3tru
7-Jan-13 18:05pm
View
I think I got it, if (p==true)
anyway used a bool it compiles, whether it will cross from one thread to the other
I guess I will need to check out.
Thanks
ve3tru
7-Jan-13 17:32pm
View
I tried it as a bool
static bool p = false;
If(p == true);
that compiles but I don't think its right
ve3tru
7-Jan-13 16:58pm
View
why cant you define P as member?
Please do explain what you mean example?.
P.S.
Might be a dumb question
but my whole thread is public static
public static void Method_11()
so why cant it pass the info
bear with me I'm learning
ve3tru
7-Jan-13 16:39pm
View
Thanks, but I already have that, in fact I have 6 threads running same time parallel. My fault I just gave you a snip-it of code, the rest is hidden so you couldn't see it. I was trying to modify a variable in one thread and get the other one to read it. The only other way I can think of doing this is Time stamping it."In your case the variable p is defined inside the method which becomes a local variable to that method so setting P inside one method doesn't have any effect on the other method."
So in other words I cant get there from here lol
ve3tru
7-Jan-13 15:54pm
View
Looks like having one thread changing a variable, and getting the other one to read it, is way too hard, well for me anyway.
ve3tru
7-Jan-13 15:39pm
View
"If you want to do something like this, then you need to make sure that both threads are looking at the same variable (and by preference use a lock to make it all a bit safer)"
Ok how do I do that, one thread keeps changing the variable, and I want the other to read the new variable.
Is this even possible?.
ve3tru
7-Jan-13 15:29pm
View
the
(int i = 0; i < 14; i++) counts 14 days
this is the last thread then the whole thing loops
It counts one day,then when p=0 "Do this", so that's just so the two threads sink together. guess the only other way is date time thing, but more work.
The second thread needs a loop, to check when p==0, that looks wrong too.
ve3tru
7-Jan-13 15:13pm
View
Yes it is in a separate thread, just trying to have one thread sink with the other
at that point. when P==0 do this.....
I'm sure I even wrote some thing incorrect.
Like I said I'm new, so please help.
ve3tru
7-Jan-13 6:09am
View
"What does it mean "around this point"
Well on debug, it starts then it stops after like 3 seconds. Its like the whole program is finished. No errors no expression is throw or problems, and no more debug, so its difficult to gauge the exact point. The too many thread thing, is probable. From what I understand, is others have run up to 50 without a problem, it just gets real slow.(Total threads might be high but I'm only running like 3 same time) What I was told, is that in theory, you can have as many threads as you want, but it will slow it down to an unusable speed,I'm not having that problem.
I have tried many versions of this code, they all fail.I was thinking opening a new thread and use a while loop instead of the event handler but some how I think that's just more resource hungry.
ve3tru
6-Jan-13 18:20pm
View
I Couldn't find the comment button thanks,
I'm using a netduino, with 60k ram 128 KB storage. It seems reasonable to me I'm just out of memory. With no errors and it just stops, I just wanted someone more knowledgeable then me have a quick look at the code, as I'm new, and really green. These are just extras I'm trying to code in, so its not a huge loss if I leave them out. The program is not long simple stuff with a lot of threads.I never knew threads eat so much memory is there a better way even a state machine is essentially a thread.
P.S.
Thanks
ve3tru
4-Dec-12 16:41pm
View
OK thanks but I'm a bit of a newb and not sure I understand your whole code.
flag = inputSource; lost me there whats an inputSource
also I guess I need it to wait some between checks. Maybe a min. or so to make sure its not still in a glitch.
thanks for the help
Show More