Re: Custom delete not getting called

2011-06-24 Thread Daniel Gibson
Am 25.06.2011 08:11, schrieb Ali Çehreli: > On Sat, 25 Jun 2011 07:52:36 +0200, Daniel Gibson wrote: >> emplace() and clear() are the functions you'll use in your custom new >> and delete implementation :-) >> See http://pastebin.com/9Qgf3vc7 for a simple example. > > You have this code: > > T m

Re: Custom delete not getting called

2011-06-24 Thread Ali Çehreli
On Sat, 25 Jun 2011 07:52:36 +0200, Daniel Gibson wrote: > Am 25.06.2011 07:50, schrieb Ali Çehreli: >> On Sat, 25 Jun 2011 07:36:21 +0200, Daniel Gibson wrote: >> >>> Am 25.06.2011 06:33, schrieb Ali Çehreli: On Sat, 25 Jun 2011 06:24:31 +0200, Andrej Mitrovic wrote: > These are go

Re: Custom delete not getting called

2011-06-24 Thread Ali Çehreli
On Sat, 25 Jun 2011 09:23:19 +0530, d coder wrote: > Hello People > > I was just trying out custom memory allocation/deallocation that can be > found on the link > http://www.d-programming-language.org/memory.html#newdelete > > The problem is that the delete function is never getting called. I h

Re: Custom delete not getting called

2011-06-24 Thread Daniel Gibson
Am 25.06.2011 07:50, schrieb Ali Çehreli: > On Sat, 25 Jun 2011 07:36:21 +0200, Daniel Gibson wrote: > >> Am 25.06.2011 06:33, schrieb Ali Çehreli: >>> On Sat, 25 Jun 2011 06:24:31 +0200, Andrej Mitrovic wrote: >>> These are going away, I don't know why they're still being kept in the do

Re: Custom delete not getting called

2011-06-24 Thread Ali Çehreli
On Sat, 25 Jun 2011 07:36:21 +0200, Daniel Gibson wrote: > Am 25.06.2011 06:33, schrieb Ali Çehreli: >> On Sat, 25 Jun 2011 06:24:31 +0200, Andrej Mitrovic wrote: >> >>> These are going away, I don't know why they're still being kept in the >>> docs. >> >> If I understood correctly, you mean tha

Re: Custom delete not getting called

2011-06-24 Thread Daniel Gibson
Am 25.06.2011 06:33, schrieb Ali Çehreli: > On Sat, 25 Jun 2011 06:24:31 +0200, Andrej Mitrovic wrote: > >> These are going away, I don't know why they're still being kept in the >> docs. > > If I understood correctly, you mean that the custom new and delete > operators for user defined types ar

Re: Custom delete not getting called

2011-06-24 Thread Andrej Mitrovic
Probably a library solution. You'll have to search the NG for topics about this though. AFAIK the new containers library should provide custom allocators, or something like that. All I know is custom new/delete ops are going away. I know how heated discussion about this can be, but don't kill the

Re: Custom delete not getting called

2011-06-24 Thread Ali Çehreli
On Sat, 25 Jun 2011 06:24:31 +0200, Andrej Mitrovic wrote: > These are going away, I don't know why they're still being kept in the > docs. If I understood correctly, you mean that the custom new and delete operators for user defined types are going away? If so, I am wasting my time writing som

Re: Custom delete not getting called

2011-06-24 Thread Andrej Mitrovic
These are going away, I don't know why they're still being kept in the docs.

Custom delete not getting called

2011-06-24 Thread d coder
Hello People I was just trying out custom memory allocation/deallocation that can be found on the link http://www.d-programming-language.org/memory.html#newdelete The problem is that the delete function is never getting called. I have put an example test case at the end of the email. Any ideas?

Re: [BUG, with testcase] problem with type system, __traits accross static libraries

2011-06-24 Thread Lloyd Dupont
Apparently it's not a bug, it's feature (I can't begin to fathom why) At any rate, by replacing writeln(mixin( "__traits(compiles, t." ~memberName ~" = (" ~typeof(__traits(getMember, T, memberName)).stringof ~").init)" )); with writeln(mixin( "__traits(compiles, t." ~memberName ~" = (typeof(

Re: About the new website

2011-06-24 Thread Walter Bright
On 6/24/2011 6:25 PM, Lloyd Dupont wrote: Congrats, looks much nicer and appealing. The library documentation seems more readable as well (in my humble opinion)! I like it too! Thanks to David, Andrei, and all who helped create it.

Re: Disabling synchronized blocks locking overhead?

2011-06-24 Thread Khint Enco
On 25/06/11 00:50, Khint Enco wrote: Misfire! No, that 'patch' does nothing .. I've added a -nosync flag to the compiler (v2.053) that removes all the effects of synchronized. It has been tested and I ran all unittests, or at least I think I did .. it took less than half a second .. It's a

Re: D on ARM

2011-06-24 Thread Patrick Down
Andrew Wiley Wrote: > So it seems that ARM is going to be getting quite a bit bigger in the > future, between the rise of smarter phones and Windows 8 support, and in > general D just doesn't exist on ARM. I second this. I've followed D for a while but most of my development has moved to mobile

Re: [BUG, with testcase] problem with type system, __traits accross static libraries

2011-06-24 Thread Lloyd Dupont
In plain English what I am trying to do: I'm testing that the property can be set. I.e. class Foo { @property public Foo Subfoo() {} @property public Foo Subfoo2() {} @property public void Subfoo2(Foo f) {} } in the above class Subfoo can't be set, Subfoo2 can. I'm testing it with Foo f, __trai

Re: Scope of variables

2011-06-24 Thread Jonathan M Davis
On 2011-06-24 17:39, Adam D. Ruppe wrote: > >void baz(local int k) { > > > >void inner(local int k) {} > > > >} > > This is unneeded. By declaring a local variable, it's > *obviously* local - there's no point in saying local again! > > Now, I've forgotten that I had a vari

About the new website

2011-06-24 Thread Lloyd Dupont
Congrats, looks much nicer and appealing. The library documentation seems more readable as well (in my humble opinion)!

Re: Programming language benchmark

2011-06-24 Thread bearophile
Don: Sorry for my slow answer, I was quite busy for days. > I've never heard that claim before. Do you have evidence for that? I compare/convert code to D every day, so I am aware that D code compiled with DMD is often slower than C/C++ code compiled with GCC. Since some years I even keep a c

Re: Scope of variables

2011-06-24 Thread bearophile
Adam D. Ruppe: > >void baz(local int k) { > >void inner(local int k) {} > >} > > This is unneeded. By declaring a local variable, it's > *obviously* local - there's no point in saying local again! > If D was a bad language that allowed implicit variable definitions, > it might ma

[BUG, with testcase] problem with type system, __traits accross static libraries

2011-06-24 Thread Lloyd Dupont
It's going to be long as I'm going to post all the code... Basically there is a bug in the type system or __traits when the program is split in static lib and exe (as opposed to all in one). My test case: - I have a all in one console application which output "true true" - I have a project with

Re: is there some know bugs with traits, type and library?

2011-06-24 Thread Lloyd Dupont
Exactly! But I was able to reproduce the bug this morning simply by splitting it in an exe and lib, as I said. Going to post it in another post! "AliÇehreli" wrote in message news:iu2hbj$gb6$2...@digitalmars.com... Are you trying to say that you can't reproduce it with this simplified cod

Re: Scope of variables

2011-06-24 Thread Adam D. Ruppe
>void baz(local int k) { >void inner(local int k) {} >} This is unneeded. By declaring a local variable, it's *obviously* local - there's no point in saying local again! Now, I've forgotten that I had a variable declared before, but adding more stuff to the argument list wouldn't

Scope of variables

2011-06-24 Thread bearophile
This post is a follow-up of something I've written almost one year ago, that I have summarized here: http://d.puremagic.com/issues/show_bug.cgi?id=5007 Feel free to ignore this post if you are busy, or if you didn't appreciate the precedent post. In my C/D programs some common troubles (or eve

Re: Disabling synchronized blocks locking overhead?

2011-06-24 Thread Khint Enco
On 24/06/11 13:04, d coder wrote: Would the patch you sent still work? Regards - Puneet Misfire! No, that 'patch' does nothing .. admittedly I'm still finding my way through the compiler source. It looks like I simply skipped the semantic check for the synchronized storage class .. or somet

Re: Mixin template evaluated to string can convert to string mixin expression implicitly

2011-06-24 Thread Alex_Dovhal
"Timon Gehr" wrote: > My question could not possibly be answered with 'yes', actually I was > interested > in what functionality your library would provide for the end user. > You answered the question "Would your library be capable of building an > AST?". Sorry for ambiguity, "yes" was answer

Re: Mixin template evaluated to string can convert to string mixin expression implicitly

2011-06-24 Thread Timon Gehr
Kenji Hara wrote: > 2011/6/25 Timon Gehr : >> String mixins themselves are 'a little bit ugly' (but unquestionably very > useful). >> I think the syntax should keep reflecting that. >> >> Your proposal is a try to make up for Ds lack of macros. I'd prefer macros. >> Also overloading the meaning of

Re: Mixin template evaluated to string can convert to string mixin expression implicitly

2011-06-24 Thread Timon Gehr
Alex_Dovhal wrote: > "Timon Gehr" wrote: >> Macros operate on ASTs, not strings. You won't get real macros, just >> something >> that feels somewhat like them. You still could implement the equivalent to >> C >> macros (not real macros either) in a library, but they would have all the >> problems

Re: D on ARM

2011-06-24 Thread Iain Buclaw
== Quote from Andrew Wiley (wiley.andre...@gmail.com)'s article > --00163691fe61ca432504a67a5605 > Content-Type: text/plain; charset=ISO-8859-1 > On Fri, Jun 24, 2011 at 12:14 PM, Walter Bright > wrote: > > On 6/23/2011 9:04 PM, Andrew Wiley wrote: > > > >> So it seems that ARM is going to be getti

Re: Here's a sneaky little bug

2011-06-24 Thread Andrej Mitrovic
On 6/24/11, Kagamin wrote: > lol, if you don't know how an operator works, don't use in bigger > expressions. It was a mistake while working on a different issue. I forgot to add the parens, and introduced a bug. People aren't robots and mistakes happen.

Re: Mixin template evaluated to string can convert to string mixinexpression implicitly

2011-06-24 Thread Alex_Dovhal
"%u" wrote: > == Quote from kenji hara (k.hara...@gmail.com)'s article >> Note: A simple way to construct environment for build dmd/druntime/phobos >> i >> s: >> 1. Expand newest release package. >> 2. Replace dmd2/src/dmd, dmd2/src/druntime, and dmd2/src/phobos to >> checkouted git repositories.

Re: Mixin template evaluated to string can convert to stringmixinexpression implicitly

2011-06-24 Thread Alex_Dovhal
"kenji hara" wrote: >Note: A simple way to construct environment for build dmd/druntime/phobos >is: >1. Expand newest release package. >2. Replace dmd2/src/dmd, dmd2/src/druntime, and dmd2/src/phobos to >checkouted git repositories. >3. Copy https://gist.github.com/1045205 into dmd2/src >I am

Re: Here's a sneaky little bug

2011-06-24 Thread Kagamin
Andrej Mitrovic Wrote: > import std.stdio; > > void main() > { > bool state = false; > writeln("state is: " ~ state ? "true" : "false"); > } lol, if you don't know how an operator works, don't use in bigger expressions. You have local variables, right? It's also a bad practice to assemb

Re: Mixin template evaluated to string can convert to string mixinexpression implicitly

2011-06-24 Thread %u
== Quote from kenji hara (k.hara...@gmail.com)'s article > Note: A simple way to construct environment for build dmd/druntime/phobos i > s: > 1. Expand newest release package. > 2. Replace dmd2/src/dmd, dmd2/src/druntime, and dmd2/src/phobos to > checkouted git repositories. > 3. Copy https://gist.

Re: D on ARM

2011-06-24 Thread Andrew Wiley
On Fri, Jun 24, 2011 at 12:14 PM, Walter Bright wrote: > On 6/23/2011 9:04 PM, Andrew Wiley wrote: > >> So it seems that ARM is going to be getting quite a bit bigger in the >> future, >> between the rise of smarter phones and Windows 8 support, >> > > I think you're right. > > I'd like to get D o

Re: D on ARM

2011-06-24 Thread Walter Bright
On 6/23/2011 9:04 PM, Andrew Wiley wrote: So it seems that ARM is going to be getting quite a bit bigger in the future, between the rise of smarter phones and Windows 8 support, I think you're right. I'd like to get D on the ARM, but it awaits someone willing to do the work.

Re: Here's a sneaky little bug

2011-06-24 Thread Nick Sabalausky
"Nick Sabalausky" wrote in message news:iu2njs$10d5$1...@digitalmars.com... > > Yea, I've learned to always use parens around any ?: inside a larger > expression (changing ?: without parens works fine, though). s/changing/chaining/

Re: Here's a sneaky little bug

2011-06-24 Thread KennyTM~
On Jun 25, 11 03:03, KennyTM~ wrote: On Jun 25, 11 02:44, Jimmy Cao wrote: On Fri, Jun 24, 2011 at 1:28 PM, Andrej Mitrovic mailto:andrej.mitrov...@gmail.com>> wrote: import std.stdio; void main() { bool state = false; writeln("state is: " ~ state ? "true" : "false"); } writes: true Whoa,

Re: Here's a sneaky little bug

2011-06-24 Thread Nick Sabalausky
"Andrej Mitrovic" wrote in message news:mailman.1195.1308940135.14074.digitalmar...@puremagic.com... > import std.stdio; > > void main() > { >bool state = false; >writeln("state is: " ~ state ? "true" : "false"); > } > > writes: > true > > Whoa, what happened? Well, this should explain th

Re: Here's a sneaky little bug

2011-06-24 Thread KennyTM~
On Jun 25, 11 02:44, Jimmy Cao wrote: On Fri, Jun 24, 2011 at 1:28 PM, Andrej Mitrovic mailto:andrej.mitrov...@gmail.com>> wrote: import std.stdio; void main() { bool state = false; writeln("state is: " ~ state ? "true" : "false"); } writes: true

Re: Here's a sneaky little bug

2011-06-24 Thread Ali Çehreli
On Fri, 24 Jun 2011 14:49:24 -0400, Steven Schveighoffer wrote: > On Fri, 24 Jun 2011 14:28:45 -0400, Andrej Mitrovic >> writeln("state is: " ~ state ? "true" : "false"); > I can never remember precedence for ?:, so quite often I will > over-parenthesize those expressions. I also typically

Re: Here's a sneaky little bug

2011-06-24 Thread Steven Schveighoffer
On Fri, 24 Jun 2011 14:28:45 -0400, Andrej Mitrovic wrote: import std.stdio; void main() { bool state = false; writeln("state is: " ~ state ? "true" : "false"); } writes: true Whoa, what happened? Well, this should explain things: bool state = false; auto str = "bla" ~ sta

Re: Here's a sneaky little bug

2011-06-24 Thread Jimmy Cao
On Fri, Jun 24, 2011 at 1:28 PM, Andrej Mitrovic wrote: > import std.stdio; > > void main() > { >bool state = false; >writeln("state is: " ~ state ? "true" : "false"); > } > > writes: > true > > Whoa, what happened? Well, this should explain things: > >bool state = false; >auto st

Re: Mixin template evaluated to string can convert to string mixin expression implicitly

2011-06-24 Thread Alex_Dovhal
"Timon Gehr" wrote: > Macros operate on ASTs, not strings. You won't get real macros, just > something > that feels somewhat like them. You still could implement the equivalent to > C > macros (not real macros either) in a library, but they would have all the > problems > of C macros, as string

Re: Here's a sneaky little bug

2011-06-24 Thread Jonathan M Davis
On 2011-06-24 11:28, Andrej Mitrovic wrote: > import std.stdio; > > void main() > { > bool state = false; > writeln("state is: " ~ state ? "true" : "false"); > } > > writes: > true > > Whoa, what happened? Well, this should explain things: > > bool state = false; > auto str = "bla" ~ state; >

Re: Here's a sneaky little bug

2011-06-24 Thread Brad Anderson
This article talks a lot about this common bug: http://www.viva64.com/en/a/0072/ On Fri, Jun 24, 2011 at 12:28 PM, Andrej Mitrovic < andrej.mitrov...@gmail.com> wrote: > import std.stdio; > > void main() > { >bool state = false; >writeln("state is: " ~ state ? "true" : "false"); > } > > w

Here's a sneaky little bug

2011-06-24 Thread Andrej Mitrovic
import std.stdio; void main() { bool state = false; writeln("state is: " ~ state ? "true" : "false"); } writes: true Whoa, what happened? Well, this should explain things: bool state = false; auto str = "bla" ~ state; What (I assume) happens is the state boolean is converted to

Re: Mixin template evaluated to string can convert to string mixin expression implicitly

2011-06-24 Thread Timon Gehr
Alex_Dovhal wrote: > "Timon Gehr" wrote: >> String mixins themselves are 'a little bit ugly' (but unquestionably very >> useful). >> I think the syntax should keep reflecting that. >> >> Your proposal is a try to make up for Ds lack of macros. I'd prefer >> macros. >> Also overloading the meaning

Re: is there some know bugs with traits, type and library?

2011-06-24 Thread Ali Çehreli
On Sat, 25 Jun 2011 00:53:16 +1000, Lloyd Dupont wrote: > I have code like that: > > module main; > > import std.variant; > import std.stdio; > import std.metastrings : Format; > import std.traits; > > public mixin template property(T, string name) { > mixin(Format!("private T _%s; >

Re: Mixin template evaluated to string can convert to string mixin

2011-06-24 Thread kenji hara
2011/6/25 d coder : > Third paragraph of section 7.6 page 282. Thank you. Ah... AST macro. I had heard that is D3 feature, but is it really realize? Kenji

Re: Mixin template evaluated to string can convert to string mixinexpression implicitly

2011-06-24 Thread kenji hara
I already checked the test implementation passed dmd build/test and phobos build/test. You can checkout 'implicit_mixin' branch from my repository (https://github.com/9rnsr/dmd/) and use it. Note: A simple way to construct environment for build dmd/druntime/phobos is: 1. Expand newest release pack

Re: Mixin template evaluated to string can convert to string mixin

2011-06-24 Thread d coder
> I also have TDPL, but I have overlooked the description. > Please tell me the page number that description is written. > > Third paragraph of section 7.6 page 282.

Re: Mixin template evaluated to string can convert to string mixin

2011-06-24 Thread kenji hara
2011/6/25 Paul D. Anderson : > Template mixins are considered experimental in TDPL. Andrei warns that this > feature could be replaced in the future. I also have TDPL, but I have overlooked the description. Please tell me the page number that description is written. > Does this proposal make that

Re: Mixin template evaluated to string can convert to string mixinexpression implicitly

2011-06-24 Thread Alex_Dovhal
"kenji hara" wrote: > My proposal is just a syntactic sugar. > You can develop such library without it. yes, but still stable DMD release can't handle pointers in CTFE. And without such syntactic sugar it's ungly to write something like that mixin(sum!q{i : iota(N); mixin(sum!q{j : iota(M), j

Re: Mixin template evaluated to string can convert to string mixin expression implicitly

2011-06-24 Thread d coder
> > > I agree that my proposal is 'just a syntactic sugar' to hide 'mixin' > keyword and parentheses. > I am working on a DSEL riding on top of D and Kenji's proposal makes lots of sense to me. At times you need to create a feeling of magic (strange things happening) and ugly syntax, especially i

Re: Mixin template evaluated to string can convert to string mixin expression implicitly

2011-06-24 Thread kenji hara
2011/6/25 Cristi Cobzarenco : > I actually like the fact that mixins are explicit - i.e ugly. When you see > the word mixin, you know to expect strange things, I would say the same > arguments that apply to C macros apply in this case as well. I agree that my proposal is 'just a syntactic sugar' t

Re: Mixin template evaluated to string can convert to string mixin

2011-06-24 Thread Paul D. Anderson
kenji hara Wrote: > Issue in bugzilla: > http://d.puremagic.com/issues/show_bug.cgi?id=6207 > Test implementation: > https://github.com/9rnsr/dmd/commit/52e4491cf6bf9ccf6dccc1fa60581fd6797d39b3 > > String mixin feature in D is very useful, but its syntax is bit ugly. > My proposal will make i

Re: Mixin template evaluated to string can convert to string mixin expression implicitly

2011-06-24 Thread kenji hara
2011/6/25 Timon Gehr : > String mixins themselves are 'a little bit ugly' (but unquestionably very > useful). > I think the syntax should keep reflecting that. > > Your proposal is a try to make up for Ds lack of macros. I'd prefer macros. > Also overloading the meaning of 'mixin template' seems t

Re: Mixin template evaluated to string can convert to string mixin expression implicitly

2011-06-24 Thread kenji hara
My proposal is just a syntactic sugar. You can develop such library without it. Kenji 2011/6/25 Alex_Dovhal : > "Timon Gehr" wrote: >> String mixins themselves are 'a little bit ugly' (but unquestionably very >> useful). >> I think the syntax should keep reflecting that. >> >> Your proposal is a

Re: Mixin template evaluated to string can convert to string mixin expression implicitly

2011-06-24 Thread Cristi Cobzarenco
I actually like the fact that mixins are explicit - i.e ugly. When you see the word mixin, you know to expect strange things, I would say the same arguments that apply to C macros apply in this case as well. --- Cristi Cobzarenco BSc in Artificial Intelligence and Computer Science University of Ed

Re: Mixin template evaluated to string can convert to string mixin expression implicitly

2011-06-24 Thread Alex_Dovhal
"Timon Gehr" wrote: > String mixins themselves are 'a little bit ugly' (but unquestionably very > useful). > I think the syntax should keep reflecting that. > > Your proposal is a try to make up for Ds lack of macros. I'd prefer > macros. > Also overloading the meaning of 'mixin template' seems

Re: Mixin template evaluated to string can convert to string mixin expression implicitly

2011-06-24 Thread Timon Gehr
kenji hara wrote: > Issue in bugzilla: > http://d.puremagic.com/issues/show_bug.cgi?id=6207 > Test implementation: > https://github.com/9rnsr/dmd/commit/52e4491cf6bf9ccf6dccc1fa60581fd6797d39b3 > > String mixin feature in D is very useful, but its syntax is bit ugly. > My proposal will make it

Re: Disabling synchronized blocks locking overhead?

2011-06-24 Thread Sean Kelly
If you synchronize via a Mutex you could create a type that detects whatever and doesn't actually lock if single threaded. core.thread.thread_needLock() is an option if you can be sure a thread won't be spawned inside your magically not-locked function. Sent from my iPhone On Jun 24, 2011, a

is there some know bugs with traits, type and library?

2011-06-24 Thread Lloyd Dupont
I have code like that: module main; import std.variant; import std.stdio; import std.metastrings : Format; import std.traits; public mixin template property(T, string name) { mixin(Format!("private T _%s; @property public T %s() { return _%s; } @property

Another variant bug? problem? misleading feature?

2011-06-24 Thread Lloyd Dupont
The following program crash with the following error: std.variant.VariantException@std\variant.d(1161): Attempt to use an uninitialized VariantN module main; import std.variant; import std.stdio; class Foo { } int main(string[] argv) { Variant v1 = Variant.init; write

Re: Disabling synchronized blocks locking overhead?

2011-06-24 Thread d coder
> > > Yes, there is a flag .. in the source code! Just download the source and > apply this patch: > > Thanks Most of the times I use explicit synchronized code blocks, instead of adding "synchronized" attribute to the function itself. Would the patch you sent still work? Regards - Puneet

Re: strange Variant bug...

2011-06-24 Thread Lloyd Dupont
Sorry for the late answer I was sick, and thanks for the fix! It works indeed! :) Now... on onto other bugs! :) "Andrei Alexandrescu" wrote in message news:itst81$1qbe$2...@digitalmars.com... On 6/22/11 5:02 AM, Lloyd Dupont wrote: Hi Andrei, Thanks for the quick fix and work around! :)

Mixin template evaluated to string can convert to string mixin expression implicitly

2011-06-24 Thread kenji hara
Issue in bugzilla: http://d.puremagic.com/issues/show_bug.cgi?id=6207 Test implementation: https://github.com/9rnsr/dmd/commit/52e4491cf6bf9ccf6dccc1fa60581fd6797d39b3 String mixin feature in D is very useful, but its syntax is bit ugly. My proposal will make it more softly, and introduces mor

Re: Disabling synchronized blocks locking overhead?

2011-06-24 Thread Khint Enco
On 24/06/11 09:57, d coder wrote: Hello List I am working on an application where I would normally be using multithreading. But sometimes, depending on how much data sharing is being shared, I might want to invoke the same application in single-threaded mode. Now when I invoke it in single-thre

Disabling synchronized blocks locking overhead?

2011-06-24 Thread d coder
Hello List I am working on an application where I would normally be using multithreading. But sometimes, depending on how much data sharing is being shared, I might want to invoke the same application in single-threaded mode. Now when I invoke it in single-threaded mode, I would not like to have