Recent Posts

Pages: 1 ... 5 6 [7] 8 9 10
61
General Discussion about just::thread / managed C++ crash
« Last post by nbsystems on January 23, 2012, 08:44:27 PM »
I'm using your current release with Visual Studio 2008.
I find that managed C++ applications or mixed mode applications that link to your debug dll crash when the module is loaded. Merely including <thread> is enough to cause this crash.
It does not crash in release mode.

Is your library tested in managed contexts?
thanks
62
General Discussion about just::thread / ANNOUNCE: Just::Thread 1.7.3 released
« Last post by Anthony Williams on January 10, 2012, 06:15:25 PM »
I am pleased to announce that version 1.7.3 of Just::Thread has been released, with the following changes:

  • The TDM port of gcc v4.6.1 for Windows is now supported
  • gcc v4.6.2 on Fedora 16 is now supported
  • std::thread::id is now a proper nested class rather than a typedef to a namespace-level class.
  • Just::Thread can now be used within a dynamically-loaded DLL on Windows

As usual, existing customers are entitled to a free upgrade to V1.7.3 from all earlier versions.
63
General Discussion about just::thread / Re: Support for wait_for_any?
« Last post by Anthony Williams on January 03, 2012, 10:21:56 AM »
Just::Thread doesn't support wait_for_any() at the moment. As you say, it's not something required by C++11, and the Boost.Thread implementation imposes overhead on the futures even if they are not used in wait_for_any.

It's something I'm considering adding when I can think of a low-overhead implementation.
64
General Discussion about just::thread / Support for wait_for_any?
« Last post by Kevin Scarr on January 01, 2012, 12:59:08 AM »
Hello

I realise that the C++11(?) standard probably does not include this facility, however the futures implementation in Boost.Thread has a "wait_for_any()" facility and I was wondering if just::thread's futures also supported something similar (ie am I missing something basic)?

Alternatively, are then any suggestions for rolling my own?? By which (of course) I am hoping for a concrete example :)

Right now, I have had to revert to the futures implementation in Boost.Thread although I still use just::thread for core thread support. Just some background: I have a pool of worker threads storage in a std::list< shared_ptr<task> > and I need the main thread to wait in case one of them explodes. Normal termination involves waking the main thread and actively stopping & join()ing the threads.

Happy New Year to all!
Kevin
65
OK, thanks, I think I've got it straight. For my purposes, I'll stick with the straight 32-bit 4.5.2 installation, since it now works.
66
There's a separate installer for the 32/64-bit version. The libjustthread32.a and libjustthread64.a libraries were built with that.

Right, but from what I'm seeing (and I admit I don't always see things correctly, esp. when gcc is concerned...) is that the 32/64-bit version is ONLY a 4.6.1 option

The 32/64-bit installer for 4.5.2 is at http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/Previous/1.1006.0/tdm64-gcc-4.5.2.exe/download
67
Hi Leor,

First the easy bit:

Which leads me to wonder why you refer to the 32/64-bit version in your README file, since that only seems to be applicable to 4.6.1

There's a separate installer for the 32/64-bit version. The libjustthread32.a and libjustthread64.a libraries were built with that.


Right, but from what I'm seeing (and I admit I don't always see things correctly, esp. when gcc is concerned...) is that the 32/64-bit version is ONLY a 4.6.1 option, and you've told me threading support isn't even there in 4.6.1, or at least not in a form compatible with just::thread (which is why I've been laboring to get 4.5.2 going). So why is there a just::thread lib for the 32/64-bit platform?

Yeah, I usually bring out the "best" in software. I've concluded it's some sort of karmic thing  :)
68
Hi Leor,

First the easy bit:

Which leads me to wonder why you refer to the 32/64-bit version in your README file, since that only seems to be applicable to 4.6.1

There's a separate installer for the 32/64-bit version. The libjustthread32.a and libjustthread64.a libraries were built with that.

It runs fine under VC9, but under TDM4.5.2 I get the following "bonus" output after the expected two lines:

terminate called after throwing an instance of 'std::system_error'
  what():

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.


What's that about?

That's a bug I just discovered this week. The internals of the library need to be destroyed in the right order, and sometimes the TDM linker destroys things in the wrong order, causing this problem. This is a bug that only applies to the TDM build as far as I can see. I'm working on a fix.

Sorry for the inconvenience; it seems you've hit more than your share of problems  :(
69
Major step forward: 'tdragon' on SourceForge replied to my bug report about the installation failure.

The tdm4.5.2 installer has a check box on the first screen labeled "Check for updated files on the TDM-GCC server" that is checked by default. I don't know about folks in the gcc world, but to ME there's a difference between "updated files" and "new releases"... apparently, what the installer really means to be saying is, "If you leave this box checked, then I will silently use the highest-numbered release there is, regardless of which version of the installer you're now running." Hence, my ending up with 4.6.1 installed when I thought I was installing 4.5.2.

So the installation error on the 32-bit version was actually an error attempting to grab a file for the 4.6.1 release (an error which doesn't seem to happen if you just run the 4.6.1 installer in the first place.) And the "experimental" version was 4.6.1 only, but I didn't know the 4.5.2 installer was doing the automatic swticheroo to that version.

If I uncheck the "check for updated files" checkbox, then I'm not offered the option of the experimental 32/64-bit version; there's only the one (32-bit) version, and it installs without error. Which leads me to wonder why you refer to the 32/64-bit version in your README file, since that only seems to be applicable to 4.6.1, and 4.6.1 isn't supposed to be just::thread-compatible? But I digress, as I now have a 32-bit 4.5.2 installed that does link with just::thread...but only if I use the explicit path name for the .a file (-ljustthread still fails to link).

Wow.

OK, next issue (lol). Consider the the following trivial program:

#include <iostream>
#include <thread>
using namespace std;

void hello()
{
   cout << "Hello from hello (in thread?)\n";
}

int main()
{
   thread t0(hello);
   cout << "Hello from main!\n";
   t0.join();
}



It builds clean under both VC9 and (now, finally) TDM4.5.2.

It runs fine under VC9, but under TDM4.5.2 I get the following "bonus" output after the expected two lines:

terminate called after throwing an instance of 'std::system_error'
  what():

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.


What's that about?

Thanks!

70
Well, that's interesting, Anthony! The last thing I expected after installing from the tdm 4.5.2 installer would be to find out it had actually installed version 4.6.1 ... but that's exactly that the 32/64 bit 4.5.2 "experimental" version did. I guess the experiment is still in progress...

So I can't install the straight 32-bit 4.5.2 because the installer immediately fails, and when I try to install the 32/64-bit, it installs the 4.6.1 compiler and who the heck knows what versions of other things.

And those are the only two options the 4.5.2 installer gives me.

You gotta love it.

Unless you have some other idea of how I can get some version of gcc going that just::thread will work with, I guess I'm doing all my testing with VC10.
Pages: 1 ... 5 6 [7] 8 9 10