W
W
work2014-12-05 00:28:18
Email
work, 2014-12-05 00:28:18

From msg to csv or vcard?

How to convert msg to csv or vcard?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MiiNiPaa, 2017-03-28
@Riki-tiki-tavi

Can n be greater than zero if we do count = 0 first?
static unsigned long count = 0;
Declares and initializes a variable. A variable is initialized only once during its lifetime. In the case of a static variable, before the first run of the function.
That is, the initial value of n is 0, after which it is no longer reset to zero.
why is mutex here
Think what will happen. if two threads stumble upon an increment at the same time without synchronization. Especially with the existence of a cache, the presence of optimizations that consolidate writing to memory, and the like. In fact, it's better to use atomic here, but oh well.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question