Re: Building application with LDC and -flto=thin fails in link stage

2018-03-27 Thread Arek via Digitalmars-d-learn
On Monday, 26 March 2018 at 22:07:49 UTC, Nordlöw wrote: When I try build my application using LDC and -flto=thin it fails in the final linking as According to LDC's Release info: Known issues: ThinLTO may not work well with the ld.bfd linker, use ld.gold instead (-linker=gold). Maybe

Re: Terminating multiple processes

2018-02-01 Thread Arek via Digitalmars-d-learn
On Thursday, 1 February 2018 at 12:30:24 UTC, Russel Winder wrote: On Thu, 2018-02-01 at 12:15 +, Arek via Digitalmars-d-learn wrote: […] Try to use inotify in non-blocking mode (an example here: https://gist.github.com/pkrnjevic/6016356) with select or epoll and timeouts. Isn't

Re: Terminating multiple processes

2018-02-01 Thread Arek via Digitalmars-d-learn
On Thursday, 1 February 2018 at 11:42:32 UTC, Russel Winder wrote: On Wed, 2018-01-31 at 22:15 +, Arek via Digitalmars-d-learn wrote: […] The problem is actually a thread blocked in an inotify blocking read. As both Steven and yourself have pointed out I am going to have to use

Re: Terminating multiple processes

2018-01-31 Thread Arek via Digitalmars-d-learn
On Wednesday, 31 January 2018 at 17:44:37 UTC, Russel Winder wrote: So, I have an application which has a sort of nano-services architecture, basically it is a set of communicating processes. Terminating those processes blocked on an input channel is quite easy, send a terminate message on the

Re: Dub and libraries

2018-01-05 Thread Arek via Digitalmars-d-learn
On Thursday, 4 January 2018 at 19:05:59 UTC, Russel Winder wrote: Is it the case that, for library things on the Dub repository, Dub will only create library archives, .a, that it is unable to create shared objects and DLLs? If they have "targetType" set to "dynamicLibrary" dub creates

Re: Does anyone understand how to use "shared" types with concurrency send/receive functions?

2017-08-16 Thread Arek via Digitalmars-d-learn
On Tuesday, 15 August 2017 at 21:54:23 UTC, Steven Schveighoffer wrote: On 8/15/17 5:27 PM, Arek wrote: On Tuesday, 15 August 2017 at 10:37:08 UTC, Kagamin wrote: Well, no wrapper is actually needed here: [...] The issue is that send cannot handle shared value types due to a bug in the

Re: Does anyone understand how to use "shared" types with concurrency send/receive functions?

2017-08-15 Thread Arek via Digitalmars-d-learn
On Tuesday, 15 August 2017 at 10:37:08 UTC, Kagamin wrote: Well, no wrapper is actually needed here: class A { int method() shared; } void consumer() { shared a = receiveOnly!(shared A)(); } void producer() { auto cons = spawn(); send(cons, new shared A()); }

Re: Does anyone understand how to use "shared" types with concurrency send/receive functions?

2017-08-14 Thread Arek via Digitalmars-d-learn
On Monday, 14 August 2017 at 21:27:48 UTC, Jonathan M Davis wrote: On Monday, August 14, 2017 15:22:23 Steven Schveighoffer via Digitalmars-d- learn wrote: On 8/13/17 11:40 PM, Jonathan M Davis via Digitalmars-d-learn wrote: > On Saturday, August 12, 2017 18:57:44 Arek via > Digital

Re: Does anyone understand how to use "shared" types with concurrency send/receive functions?

2017-08-14 Thread Arek via Digitalmars-d-learn
On Monday, 14 August 2017 at 19:22:23 UTC, Steven Schveighoffer wrote: On 8/13/17 11:40 PM, Jonathan M Davis via Digitalmars-d-learn wrote: On Saturday, August 12, 2017 18:57:44 Arek via Digitalmars-d-learn wrote: I have the folowing problem: I like to envelope the class object in struct

Re: Does anyone understand how to use "shared" types with concurrency send/receive functions?

2017-08-14 Thread Arek via Digitalmars-d-learn
On Monday, 14 August 2017 at 03:59:48 UTC, Jonathan M Davis wrote: On Sunday, August 13, 2017 16:40:03 crimaniak via Digitalmars-d-learn wrote: More of this, I think, you can't avoid __gshared for any complex work. Even mutexes from Phobos doesn't support shared, so I had to 'cowboy with

Re: Does anyone understand how to use "shared" types with concurrency send/receive functions?

2017-08-14 Thread Arek via Digitalmars-d-learn
On Monday, 14 August 2017 at 03:40:26 UTC, Jonathan M Davis wrote: On Saturday, August 12, 2017 18:57:44 Arek via Digitalmars-d-learn wrote: I have the folowing problem: I like to envelope the class object in struct to control the destruction moment and then send this object to another thread

Re: Does anyone understand how to use "shared" types with concurrency send/receive functions?

2017-08-13 Thread Arek via Digitalmars-d-learn
On Sunday, 13 August 2017 at 02:50:13 UTC, crimaniak wrote: On Saturday, 12 August 2017 at 18:57:44 UTC, Arek wrote: I have the folowing problem: I like to envelope the class object in struct to control the destruction moment and then send this object to another thread/fiber (or task, cause I

Does anyone understand how to use "shared" types with concurrency send/receive functions?

2017-08-12 Thread Arek via Digitalmars-d-learn
I have the folowing problem: I like to envelope the class object in struct to control the destruction moment and then send this object to another thread/fiber (or task, cause I use vibe-d). I can't find any method to make it working. Any ideas? dmd (version 075) gives so stupid results, I

Re: Implementing interface in the class hierarchy

2017-07-15 Thread Arek via Digitalmars-d-learn
On Friday, 14 July 2017 at 12:31:49 UTC, Steven Schveighoffer wrote: Relevant enhancement request: https://issues.dlang.org/show_bug.cgi?id=2565 -Steve So it looks like there are no rational arguments for such a language specification, and this behavior is derived from some aspect of the

Implementing interface in the class hierarchy

2017-07-14 Thread Arek via Digitalmars-d-learn
According to language reference (part 'Interfaces') this code will not compile: interface D { int foo(); } class A : D { int foo() { return 1; } } class B : A, D <- Error: class B interface function 'foo' is not implemented { } Because: 'A reimplemented interface must implement all

Re: Static array size?

2017-02-09 Thread Arek via Digitalmars-d-learn
On Thursday, 9 February 2017 at 11:22:28 UTC, Suliman wrote: Docs says that: "The total size of a static array cannot exceed 16Mb." But when I am creation array of: int [1000_000] x; // 1000_000 is equal ~ 0,95MB app crush on start. Should it's reserve this memory with guaranty? I mean that