04:18.23 | *** join/#stepcode stirk (~charlie@c-107-2-138-189.hsd1.co.comcast.net) |
04:21.25 | *** join/#stepcode cwstirk (~charlie@c-107-2-138-189.hsd1.co.comcast.net) |
07:56.50 | *** join/#stepcode mpictor (~mark@c-68-58-38-45.hsd1.in.comcast.net) |
11:03.33 | *** join/#stepcode hoiji (671b082a@gateway/web/cgi-irc/kiwiirc.com/ip.103.27.8.42) |
12:34.01 | *** join/#stepcode rigtig181 (7caac741@gateway/web/freenode/ip.124.170.199.65) |
15:47.43 | hoiji | mpictor: We had a discussion few days ago about, whether we should |
15:47.43 | hoiji | (1) use a macro demarcate the thread safe code OR |
15:47.43 | hoiji | (2) use a function with different name. |
15:48.03 | hoiji | That time I had argued in the favour of using a function with a different name. My reason for that was, that some of the features become memory hungry when converted to their thread safe form. |
15:48.05 | hoiji | Hence the decision on whether to use or not to use them should be left to the user. |
15:48.17 | hoiji | However now, I have encountered some of the functionalites which if made as per option (2) would require a lot of code duplication due to many thread unsafe internal functions. |
15:49.09 | hoiji | One way around that problem is, that in every such internal function we introduce an extra boolean parameter say threadSafeMode, to determine whether the thread safe part or thread unsafe part of the function executes. |
15:49.18 | hoiji | But this might make the code look ugly (as compared to option (1)). |
15:49.19 | hoiji | Another way is that to use option (2) for some functions and option (1) on other. |
15:49.31 | hoiji | Plz give your views in this matter. I also apologize for not foreseeing this situtation well in advance. :( |
16:02.25 | *** join/#stepcode cwstirk (~charlie@c-107-2-138-189.hsd1.co.comcast.net) |
16:37.42 | *** join/#stepcode hoiji (671b082a@gateway/web/cgi-irc/kiwiirc.com/ip.103.27.8.42) |
17:08.43 | *** join/#stepcode hoiji (671b082a@gateway/web/cgi-irc/kiwiirc.com/ip.103.27.8.42) |
17:32.14 | starseeker | hoiji: do you have any insight as to *why* the memory consumption goes up so much in thread-safe form? |
17:33.41 | starseeker | would suggest, if a parameter is needed, to allow the user to request how *many* threads to use |
17:33.56 | starseeker | so n=1 would be single threaded |
17:35.27 | starseeker | also, generally speaking, if you're duplicating code that means we need to pull the duplicated functionality into its own functions/libraries, and have all the places you were duplicating the logic call those functions |
17:36.02 | starseeker | when you say "thread safe internal functions", by "internal" do you mean from the operating system or from stepcode? |
17:36.13 | starseeker | if the latter, could those internal functions be reworked? |