473,657 Members | 2,418 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

thread lockup when comiling with optimizations.

I've added an extra thread to my application read from an alsa midi device,
and when I compile with any optimizations (gcc -O3 or gcc -O2) the
application "freezes" (meaning I don't know what code is still executing)
after the last of my threads (I have three, including the main thread).

This does not happen w/o optimizations.

Cheers
Jul 22 '05 #1
2 1077
Patrick Stinson wrote:
I've added an extra thread to my application read from an alsa midi device,
and when I compile with any optimizations (gcc -O3 or gcc -O2) the
application "freezes" (meaning I don't know what code is still executing)
after the last of my threads (I have three, including the main thread).

This does not happen w/o optimizations.


Your issue cannot be resolved in terms of the standard C++ language. It
doesn't define threads, and optimisations are compiler-specific. Ask in
a newsgroup dedicated to your OS and/or your compiler.

V
Jul 22 '05 #2
Patrick Stinson <pa*********@gc i.net> wrote in
news:10******** *****@corp.supe rnews.com:
I've added an extra thread to my application read from an alsa midi
device, and when I compile with any optimizations (gcc -O3 or gcc -O2)
the application "freezes" (meaning I don't know what code is still
executing) after the last of my threads (I have three, including the
main thread).

This does not happen w/o optimizations.


You're in the wrong place. Comp.lang.c++ deals with Standard C++, which
has no concept of threading. Try in a newsgroup dedicated to your compiler
vendor and/or O/S platform.
Jul 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1518
by: Craig Stadler | last post by:
mySQL win32 (4.0.22) I am using mySQL Control Admin and seeing a lockup on a thread specific to a like query. select * from table1 where field1 like 'http://h%' limit 100 This request will sit (thread) forever and never return any records. (status : sending...) However : select * from table1 where field1 like 'http://h%' limit 100
3
1256
by: Tony Epton | last post by:
Got a site where we are still running the front end and back end on an older machine under access 97 plus a new machine using XP as the front end. Only installed the XP version yesterday. Client is reporting a one off complete lockup of the 97 machine this morning (sounds like it happened when the XP machine looked at it). They are back up and running happily at this moment.
7
2301
by: Chad Zalkin | last post by:
We are evaluating some old code that was written as part of our math library. This code uses some optimizations that I'm not sure are necessary or safe, but is a source of debate between my coworkers. Method 1 includes a temporary storage varriable at class scope. Method 2 includes a temporary storage varriable at method scope. Method 3 includes a temporary static storage varriable at method scope. Are any of the methods better than...
17
6408
by: OlafMeding | last post by:
Below are 2 files that isolate the problem. Note, both programs hang (stop responding) with hyper-threading turned on (a BIOS setting), but work as expected with hyper-threading turned off. Note, the Windows task manager shows 2 CPUs on the Performance tab with hyper-threading is turned on. Both Python 2.3.5 and 2.4.3 (downloaded from python.org) have this problem. The operating system is MS Windows XP Professional.
5
2534
by: RWF | last post by:
I have a form, and from the form when a user clicks a button, it instantiates control that will be doing a lot of logic. I am trying to use System.Threading.ThreadPool.QueueUserWorkItem to spawn a background thread off the pool. I stepped through the logic, and everything seems to go through fine when the control is initialized, and my main form continues to work correctly. The only issue is that the control seems to not render properly...
20
1942
by: NOtcarvinSPAM | last post by:
Obviously wrapping a critical section around access to some set of shared state variables flushes any cached data, etc so that the threads involved don't see a stale copy. What I was wondering is *what* exactly gets flushed. Does the compiler some how determine the data that is accessible from that thread, and flush just that set? (Seems unlikely to me). Is it all data cached in registers etc? Or am I overthinking this and instead...
18
10225
by: =?Utf-8?B?VGhlU2lsdmVySGFtbWVy?= | last post by:
Because C# has no native SSH class, I am using SharpSSH. Sometimes, for reasons I do not know, a Connect call will totally lock up the thread and never return. I am sure it has something to do with weirdness going on with the server I am talking to. Anyhow, this locked up state happens once in a while (maybe once per day) and I can't figure out how to deal with the locked up thread. If I issue a Thread.Abort() the exception never...
23
4271
by: =?GB2312?B?0rvK18qr?= | last post by:
Hi all, Recently I had a new coworker. There is some dispute between us. The last company he worked for has a special networking programming model. They split the business logic into different modules, and have a dedicated thread for the each module. Modules exchanged info through a in-memory message queue. In my opinion, such a model means very complicated asynchronous
8
1415
by: Markus | last post by:
Hello everyone. Recently I stumbled upon an interesting problem related to thread-parallel programming in C (and similarily C++). As an example assume a simple "buffer" array of size 8, e.g. with static lifetime and exteral linkage. One thread fills the buffer structure, and the other in some way evaluates its contents, e.g. do { synchronize_with_other_thread(); for (int i=0;i<8;++i) {
0
8402
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8315
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8734
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8608
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7341
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4164
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4323
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2733
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1627
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.