text:
Posts tagged 'New York'
Stars Rising and Falling
My Stars Are Still Shining: A Memoir by Amina Warsuma.
Amina Warsuma has experienced abandonment, bullying, abuse, jealousy, drugs, rape, destitution, wealth, celebrity, insight, care and compassion in her life, so far. In My Stars Are Still Shining she shares these childhood, adolescent and adult events, reactions, and consequences with complete honesty and understanding. Nobody is vilified, or perfect, including herself. I found her life to be both fascinating, and instructive.
The story begins with the background of the two women who had the most influence on Amina – Miss June and Miss Billie. She describes there lives growing up in Mobile, Alabama, how they ended up in New York, and how they came into Amina's life. She shares there relationships, families, ups and downs, and personalities. Once that foundation is set, she takes the reader into her confidence and explores her own beginning years, and the mother (Virginia) who was so often absent.
"We were at Miss June's no more than 10 minutes when my mother said, 'I'm going to the store. I'll be right back.' She exited Miss June's apartment and day after day, Miss June and I waited for her to return. A week passed and my mother was nowhere to be seen. My mother disappeared for 5 years." Similar occurrences took place throughout Amina's life, including moving from one house to another throughout New York City.
This is a fascinating book. It is part historical (about the South in the last century, and New York City and Harlem in the 40s, 50s, and 60s); part autobiographical (as the author grows up and comes into her own); and part biography (about Michael Jackson, and her longtime friendship with him and his family). Amina has endured many things, and flourished as a model, writer, actress, producer, and dancer. She reveals herself with both objectivity, insight and emotion. Don't hesitate to get a copy of My Stars Are Still Shining.
book, Uncategorized, writing
Agatha Christie Meets Nora Roberts
Killing at the White Swan Inn by Carole Hall.
Melange Books, 2017
If Nora Roberts, Agatha Christie, and Salman Rushdie wrote as a ménage à trois, Killing at the Swan Inn could be the story they birthed. Ms. Hall has written a tale that combines a cozy murder-mystery, with contemporary romance, and cultural differences, which converge in the Berkshires at Margot's newly acquired inn (The White Swan).
The characters who inhabit the inn, and who visit, are introduced in quick succession, with readers understanding, and cheerleading, for each to find release from an abusive relationship (Veronica Hewitt), forgiveness and redemption (Charles Allan Whittaker), safety from a vengeful family (Soraya and Omar Sulaman-Mamoud), and love (Isobel, Manager John, Charles, and Detective Adrian Reynolds).
Those who work at the inn, and mourn the loss of long-time owner, Isobel's mother Claire, run the inn like a family, and try to make the well-known, and famous men and women that visit, a sense of it being their home as well. This sense of caring for one another is evident and visceral throughout, and one of the strongest characteristics of the story. Humanity at its best.
Killing at the White Swan is an enjoyable, and brief visit, with people you'd want to meet in person, let alone spend a weekend at the inn.
It Only Gets Better
Crowded by Eleanor Green
Bree is a sex addict. Jane is a killer. Anna is a hard-working florist. Each is distinct and completely different from one another. Bree has no problem meeting, and using men. Jane hates men and protects other women from them. Anna loves the man she meets, Pratt, and is always questioning herself. We follow each woman, and their experiences in New York, with alternating chapters focusing on one or the other.
Ms. Green has written believable and contrasting characters, who appear to have little in common. The characteristics of each person are so well defined, that even without chapter headings it would be easy to know who is speaking, what they are thinking, and what is taking place. As Bree continues trying to avoid love, and Anna searches for it, Jane is destroying possibilities of love, and those who abuse others.
As the story continues, and more details are conveyed, readers' may be able to ascertain a few overlapping connections, but each could be a book unto itself. Bree would be about a woman living in the moment, and not wanting attachment, similar to Diane Keaton in Finding Mr. Goodbar. Jane would be a serial killer murder mystery. And Anna, would be a contemporary romance.
Crowded gets better with each page, as we come to understand how Bree, Jane, and Anna, see themselves, those they are in relationship with, and the world around them. The past has a powerful impact on the present, and the present is a different experience for each character. Am very pleased to have been encouraged to read this book.
Eleanor Greene
My Son Ryan
Profile of Jeanne White and her son Ryan. From Don't Just Sit There, Do Something! Grief's Wake Up Call.
In 1984, one week before Christmas, Jeanne White was told that her son Ryan had contracted AIDS from a blood product he'd used to control his hemophilia. The doctors gave him six months to live. Struggling to make life as normal as possible for her thirteen-year-old son, she attempted to have him return to school as soon as possible.
She did not realize the amount of fear and prejudice that would result when the school heard of his illness and refused to allow his return. After numerous court battles, which brought he and his mother to national and international attention, Ryan was allowed back in school, only to be inundated with hate, ignorance and abuse. As a result of their struggles Ryan was befriended by numerous celebrities such as Elton John, Michael Jackson and Phil Donahue and began to educate children and parents about AIDS by speaking at schools, appearing on numerous talk shows and news programs and having a movie about his life broadcast on national television. On April 11, 1990, five and a half years after his six-month prognosis, Ryan died. His funeral was one of the most publicized services of that decade.
Shortly after Ryan's death his mother Jeanne, who had always been behind the scenes publicly, was asked by several senators to speak about Ryan to Congress in order to pass national legislation for AIDS education. She reluctantly agreed and was instantly thrown into the media spotlight. The bill, THE RYAN WHITE CARE ACT, was subsequently passed and Jeanne White became one of the most sought after speakers in the country. She founded the Ryan White Foundation and continues advocating for AIDS education and prevention with children, teenagers and their peers.
JEANNE WHITE:
A lot of times it takes a little push. Everybody likes feeling sorry for them selves over the death of a loved one. That's kind of normal. With me it was Senator Kennedy and Senator Hatch who got me going and I fought it every step of the way. Ryan was always the public speaker not me.I was just following Ryan around. Senator Kennedy and Hatch had just named a bill after Ryan called the Ryan White Care Act and they wanted me to come to Washington DC. It was too soon. We had just buried Ryan two days before and they asked me to come anyway. They knew it was going to be hard, but they said, "You know, this is the first chance that we have of getting something done for people with AIDS." They said, "Ryan's death is so fresh on everybody's mind, his illness and funeral was carried by every network for the last week and a half. This is the first chance of someone being in the public eye that takes the focus off the disease and puts it on to the fact that 'anybody can get it.'"
I said, "Yes". I said, "No". I said, "I can't, I really can't. Ryan used to do that, not me." On the second day people from Senator Kennedy's staff called me again. They said, "Terry's going to be there." Terry and others had helped me through a lot of bad times. During all the years that Ryan fought AIDS the more people I knew that died of AIDS. And I had seen so many families just like me. Even though I didn't want to get involved, so many people helped me that I kind of felt like I owed it to them. Then Senator Hatch called me and said, "You know, we're not going to take 'no' for an answer. I have twenty-three senators lined up for you. All we want you to do is tell what it's like to watch your son live and die with this disease."
So I went to Washington and I'm so glad I did. It made me feel good. I didn't feel I did great, not like I wanted to. I could have done better but I knew I was sincere in what I felt and said. After that, people wouldn't let me stop.
Phil Donahue, who was a pallbearer at Ryan's funeral, has become a very good friend of the family. When he was in the hospital visiting Ryan he noticed all the mail and could not believe how much was pouring in. He took a bunch of the letters back to New York with him and called saying, "Do you realize these letters are all from kids?!" I said, "Well yeah, that's who generally wrote Ryan." He said, "Jeannie, you've got to continue this work. You've got to answer this mail." Phil said, "I'll hire you an assistant." There were over sixty thousand letters! Phil kept his word and with the help of Marlo Thomas and the St. Jude volunteers, they were able to find a lady that lived close by.
I was so impressed with Ryan, so proud of him. Sometimes I'd think, "Golly, is he really my son?" To me he was just my little kid, but to the nation, he was this celebrity and hero. I hated to even think that I could follow him, his impact was so great and people listened. When I speak I'm always a nervous wreck, even though I've been doing it now for years. I've messed up a lot, but I'm me. When I introduce myself I say, "I'm just a mom. I'm a mom just like your mom and because of this misunderstood disease called AIDS, my life changed overnight." I say a prayer every time I go out. I say, "Lord, please help me to get through this. Help me educate these young people. Help me make a difference in their lives with my story." Then I say, "Ryan, please be there with me." Then I have this kind of surge that goes through me and I feel like its Ryan saying, "OK, Mom, I'm with you."
I think we've made a lot of progress. By "we" I mean everybody who has committed so hard to fighting this disease with education and through therapy and drugs and medical treatment. I think we've come a long way. The people who have to be commended the most are the people that are not here. Their lives had to be lost for us to get where we are today, to show compassion. Even though I'm tired I'm still doing it because of the Terry Burns, the Mike Callums and the family members that I've seen.
One day we were riding in the van and Ryan reached over and grabbed my hand and started swinging it. I looked over and said, "OK, what do you want?" He said, "I don't want anything." "Come on Ryan, what do you want?" I continued. He replied, "Can't a son hold his mother's hand? " I said, "Come on, you really don't want anything?" "Mom, I just want to say thank you for standing by me, for always being there for me."
I remember that moment when I speak to teenagers. You know, we always think everybody's going to be here tomorrow, but one day you're going to wake up and somebody's not going to be there. I say, "You might think this stupid old lady up here doesn't know what she's talking about, but I do. The next time you go home from school, even if you think it's the corniest thing you've ever done, write a letter to your parents. If you think you're real cool and you can't go up and hug them around their neck and say, 'Mom. Dad. Thank you. I love you.' Then write a note and put it on their pillow. Do something so that you'll never be sorry."
It would have been easy to be mad all the time at the people who ridiculed us, who discriminated against us, but we had to put our lives in perspective and look at what was really important and what wasn't. Everybody saw on the news that it was this fight for Ryan to go to school, but the number one priority in our life was keeping him healthy. Second, was keeping my job at General Motors, because we had great insurance and it paid for all his medical bills. And the third part was my daughter Andrea, keeping us together as a family.
At first, it's like, "Why?" Everybody wants to know why. Why wasn't he given a miracle? All my life I was taught if you pray hard enough, if you believed hard enough, that you would get a miracle and you could never doubt that or you wouldn't get one. I never thought Ryan was going to die. I just couldn't quite understand that. I thought nobody had more people praying over them than Ryan did. I prayed, "Lord, wouldn't it be nice to show this kid a miracle in front of the whole nation." Everybody knew he's lived with AIDS for five and half years. He'd been in and out of hospitals. He's been blind twice. I mean, this kid had a heck of a life, why couldn't he be given a miracle? When he died, it was like, "Why? What more could we have done?"
When he died I was really taken aback. I started questioning my faith. I think that's normal. I mean, I started wondering if there really is a god? How does God let things like this happen? I see people around me all the time asking that question. "Why do young kids have to die?" I mean, anybody really, lots of other good people have died too. So then I started trying to find reasons.
After awhile it started to get clearer. "Look at all the things he's done in his short life. He's educated so many people. Wouldn't we all like to say we had accomplished as much as this kid did in only 18 years?!"
I tell the kids that when I get to heaven I'm going to be angry. I hope the Lord forgives me for being angry, but I'm going to say, "Why did you have to take Ryan?" Then I say, "You know what I think he's going to say? He's going to say, 'You know what, he was only supposed to live three to six months. I gave you five and a half years and you're still not happy.'" Maybe I got a miracle. We had quite a few Christmases that we never thought we were going to have.
I didn't want to lose my faith. I was mad at my faith. I was mad at my church. I was mad at my religion. I was mad at God. But I wanted to find a reason. I eventually started seeing things around me like the Ryan White Care Act and Elton John go through rehabilitation and get off of drugs and alcohol and I thought, "My goodness, Ryan touched more lives than I ever knew. Perhaps those people got miracles and they don't know it."
Michael (Jackson) was a real good friend of Ryan's. When Michael called Ryan in the hospital once, Elton said, "With all the money that's in this room, we can't bring this boy back to life." That was a real big realization to Elton . . . that he had all the money in the world, he had everything he could ever buy, but he could not buy his health. That's why he entered rehab. When Michael called me after Ryan died, just to see how I was doing, I said, "I'm doing OK but what made you and Ryan so close?" When Michael would call, they would have long phone conversations. He said, "You know, most people can't get over the awe of who I am, so nobody can ever act normal around me. Ryan knew how I wanted to be treated, because that's how he wanted to be treated. I can't trust anyone because everybody always wants something from me." He could tell Ryan anything and Ryan wasn't going to go blab it or tell it, you know. "I promised Ryan he could be in my next video and now that he's gone I want to do a video for him." He made a video called Going Too Soon, which was about Ryan.
It's hard to talk about death. I didn't want to talk about it because I didn't really think he was going to die. I can remember him saying what he wanted to be buried in. I told him I really didn't want to talk about it but he went on anyway, "I know you like me in a tux but I don't want to buried in one." I said, "OK, Ryan, what do you want?" I mean, it's like, I'd say anything to get this conversation over with. He says, "I want to be buried in my Guess jeans, my red T&C (Town and Country) shirt, my Air Jordan's and my Jean jacket." He pauses, as I'm fading out, then says, "You know how people are when they're lying in a casket and everybody is watching their eyes to see if their eyes move? I want my sunglasses on and I want to be buried in my boxer shorts." "Your boxer shorts?" I exclaimed. He'd just switched from wearing briefs to boxer shorts and really liked them. "Why your boxer shorts?" I deadpanned. "You know that hernia I got? I want to make sure I . . ." He had a hernia that they couldn't operate on because he had no platelets. "I want to make sure I'm comfortable." And I thought, 'Well, if you're dead, I mean . . .' "OK, just talk," Ryan said. "You know, as a mom."
One of the best things after Ryan died was when people talked about him. I think it was also good for me to get involved in something I truly believed in, doing something, instead of sitting at home feeling sorry for myself. That's the easy way to go . . . feeling sorry for yourself. People didn't let me, although that's what I probably would have done if not pushed. But people were always talking about Ryan and people still do and that kind of keeps him alive within me.
More inspiring people at Don't Just Sit There, Do Something! Grief's Wake Up Call.
Jeanne White
Ryan White Foundation
Senator Hatch
Senator Kennedy
The Ryan White Care Act
Review of American Saint
American Saint: The Life of Elizabeth Seton
Written by Joan Barthel
Reviewed by Gregory J. Wilkin
"Characters like these, and scenes from the siege of New York, as well as the flirtation between Elizabeth and the handsome Antonio Filicchi, along with a very good death . . . all make this perfect fodder for a movie. It's also perfectly suited to a book."
Joan Barthel, whose earlier work dealt with murder cases in Connecticut and California that only an act of God could keep from turning into movies, seems to have a winner here with her timely and largely adulatory biography of Mother Elizabeth Seton.
After watching Meryl Streep's despairing turn as Sister Aloysius in John Patrick Shanley's Doubt and Barbara Jefford's as the enragingly venomous mother superior in Judy Dench's Philomena (as I'm confident He did, on a very big screen), Our Lord may want to get this book made into a movie Himself.
Publicity for the book emphasizes Seton's wealthy upbringing, her political connections in the young republic, the sad tale of her husband's early death in Italy, and the way she "resisted male clerical control of her religious order, as nuns are doing today."
The life Barthels recounts counts in different ways for different folks: Maya Angelou in her foreword to the volume says "Seton's life and achievements are proof that courage is the most important of all the virtues."
True enough, Seton had to fight off the harshly overbearing Father Superior, John David, but in doing so, she worked closely with two other French priests and Bishop John Carroll. Courage it took, but to bill her as an early Catholic flouter-of-male-privilege is certainly to engage in a rather crass kind of book mongering.
In her introduction, Barthels situates her biography in the fraught context of the current administrative dispute about American nuns. The Vatican "doctrinal assessment," which Sister Maureen Fiedler called on NPR "a hostile takeover," will take five years to be prepared "and no one knows," Barthels writes, "what will happen in the end." In one of the least successful segues she pauses, indents, and gives us: "But Elizabeth Seton was there at the beginning."
These beginnings bring out the best in our author: the early days in the Bayley family in New York are vivid and convincing, full of period detail and useful cultural background. As the young widow and mother takes her charges to Emmitsburg, the narration begins to rely on her letters, at one point quite a few of them rather wearily strung together. But some of this was heroic, loving effort by Seton herself, carried on despite fevers and worsening tuberculosis.
This is a lady who went through a lot. The accounts of the death of her daughters show her face to face with doubt:
"'Eternity' had long been her beloved word, her hope and belief. Now she was "uncertain of reunion." She was kneeling at Anna's grave when she saw a large, ugly snake stretching itself on the dried grass. Elizabeth was desolate, seeing Anna as 'the companion of worms and reptiles! And the beautiful soul, where?'"
The takeaway here: doubt for the faithful, even for the saints, is one's daily bread. Despite it all, Elizabeth Seton keeps her wits and her charm.
Read entire review and more at NEW YORK JOURNAL OF BOOKS
American Saint
Gregory J. Wilkin
NYJB
Transhumanist Novel
The Transhumanist Wager by Zoltan Istvan
"In-depth philosophical essays and visionary science dressed up as a novel."
If you enjoy philosophy, you'll love this book. If you're a science geek you'll read every word. If you are religious, spiritual, or into the supernatural, you'll probably dismiss it, misunderstand it, and/or hate it.
Author Zoltan Istvan has taken a thinly disguised autobiography and transformed it into an almost plausible new world thriller that tends to go overboard on pontification and argument by the protagonist Jethro Knights, who becomes the mover and shaker of the Transhumanist movement and literally changes the entire world.
Istvan notes on the last page, "This story, The Transhumanist Wager, is the result of two decades of thought and inquiry into transhumanism and the quest for scientific immortality. I wrote it hoping to change people's ideas of what a human being is and what it can become."
A Transhumanist is someone who believes that the human race can evolve beyond its current limitations and can do so by means of technology and science.
The book has its moments. The love story between Jethro Knights and neurosurgeon Zoe Bach is believable and the action sequences in the book are top notch. The philosophy, debates, insights, and vision included in these pages are thought provoking and challenging, as are the observations about the clashes between religious fanatics and fundamentalists and those who believe in science, progress, choice and technology.
From a strictly literary perspective The Transhumanist Wager is nothing more than a collection of in-depth philosophical essays and visionary science dressed up as a novel. There are too many abrupt changes, events, and conclusions taking place in unrealistic periods of time without much depth or nuance to completely engage the reader.
Read entire review and others at NEW YORK JOURNAL OF BOOKS
The Transhumanist Wager
What She Left Behind
by Ellen Marie Wiseman
"What She Left Behind screams with authenticity, depth, and understanding."
She's done it again. At this time last year, Ms. Wiseman's first novel The Plum Tree was released. It was excellent and received deservedly wonderful reviews. It is rare that a writer's follow up work is as good as their first. Such a rarity has been accomplished with What She Left Behind. The author has once again delved into the lives of teenage girls, albeit in different circumstances than her first work, yet with the same insight, nuance, and raw emotion readers can appreciate and enjoy.
One of the girls in the story is 18 and is living in the 1930s (Clara) and the other (Izzy), lives in the 1990s. Clara is sent to a state mental institution (Willard State), because she challenges her father's wishes for whom she should marry and Izzy must adapt to a new set of foster parents and her last year in high school, as a result of her mother having killed her father when she was seven. The girls' lives intersect when Izzy gets involved in a project that unearths suitcases in the now defunct mental institution in which Clara was captive—she finds Clara's journal and photo inside.
The scenes of Clara's experience and travails at Willard State are all too real and affecting in part because many similar circumstances actually took place at that mental facility and others around the country for many decades. Izzy's struggle with a school bully, harming herself, and learning who and how to accept love and whom to trust, is no less impactful than Clara's chapters.
What She Left Behind screams with authenticity, depth, and understanding of human behavior and what can and has been done to others to maintain control.
Read entire review and more at New York Journal of Books.
Ellen Marie Wiseman


text:
Home > News > Interviews
By Jeremy Taylor
Me and My Motor: Line of Duty star Vicky McClure
The police drama actress does a mean doughnut
THE ACTRESS Vicky McClure, a self-confessed girl racer, once turned the air blue during a memorable Top Gear appearance as the Star in a Reasonably Fast Car.
She crossed the line last year with a scorching lap time of 1 minute and 45 seconds, becoming the fastest woman on the scoreboard — 11th overall and just below the actor David Tennant. "I've never concentrated so hard in my life," she laughs. "I was determined to set a fast time."
McClure, 35, has form. In her late teens she joined a group of car fanatics who pimped their motors with alloy wheels, spoilers and sound systems.
"We had a thing called 'the circuit'," she says. "It was places around the city centre where you could hang out in car parks and do wheel-spinning doughnuts.
"I'd left school with hardly any qualifications and had a bit of a wasted year when I was 17. I was obsessed with the Golf GTI and knew all the different types. My mates and I even went to Volkswagen festivals — I really got the idea of modifying cars."
McClure is currently starring as DS Kate Fleming in the fifth series of Line of Duty, which started on BBC1 at the end of March, with the first episode attracting more than 11m viewers. A sixth series has been commissioned, but McClure is keeping tight-lipped about whether she will appear.
She grew up in Nottingham, with her joiner father and hairdresser mother, and started dance classes aged three and acting when she was 11. At 15 she won a part in the film A Room for Romeo Brass, directed by the Nottingham-based film maker Shane Meadows.
The Aston Martin Vantage is my fantasy car. Ferraris and Lamborghinis are OK, but an Aston is really cool
She failed her driving test twice in her teens but was determined to pass so that she could attend additions. "I was living at home in Nottingham and borrowed my parents' Mazda 323 to get around. hen I turned 21, they gave me the car as a birthday present. Suddenly I felt independent."
In 2006 she appeared in Meadows's critically acclaimed This Is England. The film's success allowed her to buy her first new car: a cream-coloured Mini One. "It arrived on a trailer from BMW Park Lane and I nicknamed her 'London Baby'. I'd never owned anything so expensive in my life but felt I had earned it. The Mini is such a cool car."
The film brought McClure to the attention of Madonna, who cast her in her directorial debut, Filth and Wisdom. "I still had a day job but now I was hanging out with a pop superstar. She flew me in her private jet to Berlin and to New York."
McClure won a Bafta reprising her role in the television spin-off of This Is England, which ran for three series between 2010 and 2015, and has been in Line of Duty since the first episode, in 2012.
She met her fiancé, the writer and actor Jonny Owen, in 2014 on the set of the film Svengaki, and the couple became engaged in December 2017. "I moved into Jonny's place in London for nine months and shared his Ford Ka. Then I persuaded him to move back to Nottingham with me."
McClure's string of high-profile roles has led to her being loaned some enviable cars. Her first was a Jaguar XF saloon, which in time she swapped for the smaller XE (pictured).
Her fantasy car is an Aston Martin. "Ferraris and Lamborghinis are OK, but an Aston is really cool. I doubt I'll ever be able to afford one, but it's good to dream.
Vicky McClure: my life in cars
2008 Mini One
2017 Jaguar XF
My dream car Aston Martin Vantage
Me and my motor
Me and My Motor: F1 driver Daniel Ricciardo
He may have seven grand prix wins under his belt, but the Renault F1 driver Daniel Ricciardo has no problem with being passed on the public road.
Grand designs: Visionaries shaping our world (spn)
How do the people who shape the world around us - the designers, architects, and engineers - define good design?
Me and My Motor: musician Rick Wakeman
"I don't drink, I don't smoke and I don't jet-set around the world," the prog rock star says. "My loves are my family, my home and my cars."

redpajama_set_name: RedPajamaCommonCrawl


28.06.2016 12:22:19 Words: attenuation, cracked media, dispersion, fluids seal vs Israeli file Per aprire il file occorre indicare.
29.06.2016 19:27:45 Service pack 3 (ISO Es una versión de Microsoft with MSVCP100.dll and MSVCR100.dll when I open some.
29.06.2016 10:51:11 Chrono Cross converted 24, 2015 OSCARS advanced.
29.06.2016 15:45:39 Rush Of Blood To The Head is a record deserving.


Peanut-free ice cream cakes are appropriate for children of all ages. Make peanut-free ice cream cakes with help from an experienced culinary professional in this free video clip.
Bio: Crystal Horton has been in love with baking from the moment her tiny hands could hold a rolling pin.
Series Description: There are truly no two ingredients that go better together than ice cream and sweet, delicious cake. Learn about ice cream and cake with help from an experienced culinary professional in this free video series.


text:
Home Climate Change Amazon rainforest will disappear by 2064, researchers predict
Amazon rain-forest will disappear by 2064
In a newspaper issued in the peer-reviewed journal Environment, scientist Robert Walker has prophesied that the unrelieved deforestation will demolish the Amazon rainforests by 2064 and the green protection will be wiped away from its existence.
The fellow at the University of Florida in his findings has said that in the years to come, it will turn into a grassland. The land will have inflammable grasses and plants, informed the Daily Mail.
According to the newspaper, the rise of drought-based tree mortality is the main concern. It will twig from the synergies of fire and deforestation.
The deviations in the regional hydroclimate are said to impact the Amazon rainforest. The droughts are destroying off the vulnerable tree species of the rainforest.
According to the newspaper, the disaster will be worse than our imagination because of the necessity of the local community on the Amazon rainforest for water.
Not only for the local community, but the effect is also going to be on the world as well. The main tropical forest which is covered around 2.3 million square miles in area controls the oxygen and carbon cycle of the ecosphere and cuts air pollution. It is the reason for calling the lungs of the Earth.
It is thought that the year 2064 will be a tipping point as the droughts will be so regular that the rainforest will not be able to improve from them. Now, they occur every four years.
The facts behind deforestation of the forestry are many but the key one is the removal of the forest land-dwelling to use it for the farming of crops. According to Professor Robert, the collapse of environmental governance in Amazonian countries, most significantly Brazil, are counting to the concerns people have about the future of the rainforest.
He added that deforestation grasped a low point in 2012 when actions were taken to curb it but soon started rising again.
An expert from the University of Leeds, Dr Adriane Muelbert has said that the retort of the ecosystem is lagging behind the frequency of climate change.
She said that a significant level of mortality was seen in the trees and the species that are prepared to survive drier climates also didn't give enough compensatory growth.
Professor Robert agrees with Dr Adriane as he said that if a canopy needs more than four years to recover from the harm in one year, then a forest can't survive. The length of the dry season has also enlarged which doesn't give the canopies sufficient time to grow.
Collision Course: Development Pushes Amazonia Toward Its Tipping Point
Robert Toovey Walker (2021) Collision Course: Development Pushes Amazonia Toward Its Tipping Point, Environment: Science and Policy for Sustainable Development, 63:1, 15-25, DOI: 10.1080/00139157.2021.1842711
Grasshoppers Translocated to High Elevations
Tunisia's ancient Olives are struggling to keep up with climate change
Previous articleClimate change: Extreme weather reasons massive losses in 2020
Next articleSoil bacteria can help to control climate change
In a newspaper issued in the peer-reviewed journal Environment, scientist Robert Walker has prophesied that the unrelieved deforestation will demolish the Amazon rainforests by 2064 and the green protection will be wiped away from its existence. - Dedes January 4, 2021 at 4:44 pm
[…] submitted by /u/cha_ghor [link] […]


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GLib Reference Manual: Threads</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="GLib Reference Manual">
<link rel="up" href="glib-core.html" title="GLib Core Application Support">
<link rel="prev" href="glib-The-Main-Event-Loop.html" title="The Main Event Loop">
<link rel="next" href="glib-Thread-Pools.html" title="Thread Pools">
<meta name="generator" content="GTK-Doc V1.21.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">

Top  |
                  Description

Threads

Threads — portable support for threads, mutexes, locks,
    conditions and thread private data

Functions

<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>

gpointer

(*GThreadFunc) ()

GThread *

g_thread_new ()

GThread *

g_thread_try_new ()

GThread *

g_thread_ref ()

void

g_thread_unref ()

gpointer

g_thread_join ()

void

g_thread_yield ()

void

g_thread_exit ()

GThread *

g_thread_self ()

void

g_mutex_init ()

void

g_mutex_clear ()

void

g_mutex_lock ()

gboolean

g_mutex_trylock ()

void

g_mutex_unlock ()

#define

G_LOCK_DEFINE()

#define

G_LOCK_DEFINE_STATIC()

#define

G_LOCK_EXTERN()

#define

G_LOCK()

#define

G_TRYLOCK()

#define

G_UNLOCK()

void

g_rec_mutex_init ()

void

g_rec_mutex_clear ()

void

g_rec_mutex_lock ()

gboolean

g_rec_mutex_trylock ()

void

g_rec_mutex_unlock ()

void

g_rw_lock_init ()

void

g_rw_lock_clear ()

void

g_rw_lock_writer_lock ()

gboolean

g_rw_lock_writer_trylock ()

void

g_rw_lock_writer_unlock ()

void

g_rw_lock_reader_lock ()

gboolean

g_rw_lock_reader_trylock ()

void

g_rw_lock_reader_unlock ()

void

g_cond_init ()

void

g_cond_clear ()

void

g_cond_wait ()

gboolean

g_cond_timed_wait ()

gboolean

g_cond_wait_until ()

void

g_cond_signal ()

void

g_cond_broadcast ()

#define

G_PRIVATE_INIT()

gpointer

g_private_get ()

void

g_private_set ()

void

g_private_replace ()

#define

g_once()

gboolean

g_once_init_enter ()

void

g_once_init_leave ()

void

g_bit_lock ()

gboolean

g_bit_trylock ()

void

g_bit_unlock ()

void

g_pointer_bit_lock ()

gboolean

g_pointer_bit_trylock ()

void

g_pointer_bit_unlock ()

guint

g_get_num_processors ()

Types and Values

<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>

#define
G_THREAD_ERROR

enum
GThreadError

GThread

union
GMutex

struct
GRecMutex

struct
GRWLock

struct
GCond

struct
GPrivate

struct
GOnce

enum
GOnceStatus

#define
G_ONCE_INIT

Includes

#include <glib.h>

Description

Threads act almost like processes, but unlike processes all threads
of one process share the same memory. This is good, as it provides
easy communication between the involved threads via this shared
memory, and it is bad, because strange things (so called
"Heisenbugs") might happen if the program is not carefully designed.
In particular, due to the concurrent nature of threads, no
assumptions on the order of execution of code running in different
threads can be made, unless order is explicitly forced by the
programmer through synchronization primitives.

The aim of the thread-related functions in GLib is to provide a
portable means for writing multi-threaded software. There are
primitives for mutexes to protect the access to portions of memory
(GMutex, GRecMutex and GRWLock). There is a facility to use
individual bits for locks (g_bit_lock()). There are primitives
for condition variables to allow synchronization of threads (GCond).
There are primitives for thread-private data - data that every
thread has a private instance of (GPrivate). There are facilities
for one-time initialization (GOnce, g_once_init_enter()). Finally,
there are primitives to create and manage threads (GThread).

The GLib threading system used to be initialized with g_thread_init().
This is no longer necessary. Since version 2.32, the GLib threading
system is automatically initialized at the start of your program,
and all thread-creation functions and synchronization primitives
are available right away.

Note that it is not safe to assume that your program has no threads
even if you don't call g_thread_new() yourself. GLib and GIO can
and will create threads for their own purposes in some cases, such
as when using g_unix_signal_source_new() or when using GDBus.

Originally, UNIX did not have threads, and therefore some traditional
UNIX APIs are problematic in threaded programs. Some notable examples
are

C library functions that return data in statically allocated
buffers, such as strtok() or strerror(). For many of these,
there are thread-safe variants with a _r suffix, or you can
look at corresponding GLib APIs (like g_strsplit() or g_strerror()).

The functions setenv() and unsetenv() manipulate the process
environment in a not thread-safe way, and may interfere with getenv()
calls in other threads. Note that getenv() calls may be hidden behind
other APIs. For example, GNU gettext() calls getenv() under the
covers. In general, it is best to treat the environment as readonly.
If you absolutely have to modify the environment, do it early in
main(), when no other threads are around yet.

The setlocale() function changes the locale for the entire process,
affecting all threads. Temporary changes to the locale are often made
to change the behavior of string scanning or formatting functions
like scanf() or printf(). GLib offers a number of string APIs
(like g_ascii_formatd() or g_ascii_strtod()) that can often be
used as an alternative. Or you can use the uselocale() function
to change the locale only for the current thread.

The fork() function only takes the calling thread into the child's
copy of the process image. If other threads were executing in critical
sections they could have left mutexes locked which could easily
cause deadlocks in the new child. For this reason, you should
call exit() or exec() as soon as possible in the child and only
make signal-safe library calls before that.

The daemon() function uses fork() in a way contrary to what is
described above. It should not be used with GLib programs.

GLib itself is internally completely thread-safe (all global data is
automatically locked), but individual data structure instances are
not automatically locked for performance reasons. For example,
you must coordinate accesses to the same GHashTable from multiple
threads. The two notable exceptions from this rule are GMainLoop
and GAsyncQueue, which are thread-safe and need no further
application-level locking to be accessed from multiple threads.
Most refcounting functions such as g_object_ref() are also thread-safe.

Functions

GThreadFunc ()

gpointer
(*GThreadFunc) (gpointer data);

Specifies the type of the func
 functions passed to g_thread_new()
or g_thread_try_new().

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

data

data passed to the thread

Returns

 the return value of the thread

g_thread_new ()

GThread *
g_thread_new (const gchar *name,
              GThreadFunc func,
              gpointer data);

This function creates a new thread. The new thread starts by invoking
func
 with the argument data. The thread will run until func
 returns
or until g_thread_exit() is called from the new thread. The return value
of func
 becomes the return value of the thread, which can be obtained
with g_thread_join().

The name
 can be useful for discriminating threads in a debugger.
It is not used for other purposes and does not have to be unique.
Some systems restrict the length of name
 to 16 bytes.

If the thread can not be created the program aborts. See
g_thread_try_new() if you want to attempt to deal with failures.

To free the struct returned by this function, use g_thread_unref().
Note that g_thread_join() implicitly unrefs the GThread as well.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

name

 an (optional) name for the new thread.

[<acronym title="NULL is OK, both for passing and for returning.">allow-none</acronym>]

func

a function to execute in the new thread

data

an argument to supply to the new thread

Returns

 the new GThread

Since 2.32

g_thread_try_new ()

GThread *
g_thread_try_new (const gchar *name,
                  GThreadFunc func,
                  gpointer data,
                  GError **error);

This function is the same as g_thread_new() except that
it allows for the possibility of failure.

If a thread can not be created (due to resource limits),
error
 is set and NULL is returned.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

name

 an (optional) name for the new thread.

[<acronym title="NULL is OK, both for passing and for returning.">allow-none</acronym>]

func

a function to execute in the new thread

data

an argument to supply to the new thread

error

return location for error, or NULL

Returns

 the new GThread, or NULL if an error occurred

Since 2.32

g_thread_ref ()

GThread *
g_thread_ref (GThread *thread);

Increase the reference count on thread
.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

thread

a GThread

Returns

 a new reference to thread

Since 2.32

g_thread_unref ()

void
g_thread_unref (GThread *thread);

Decrease the reference count on thread
, possibly freeing all
resources associated with it.

Note that each thread holds a reference to its GThread while
it is running, so it is safe to drop your own reference to it
if you don't need it anymore.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

thread

a GThread

Since 2.32

g_thread_join ()

gpointer
g_thread_join (GThread *thread);

Waits until thread
 finishes, i.e. the function func
, as
given to g_thread_new(), returns or g_thread_exit() is called.
If thread
 has already terminated, then g_thread_join()
returns immediately.

Any thread can wait for any other thread by calling g_thread_join(),
not just its 'creator'. Calling g_thread_join() from multiple threads
for the same thread
 leads to undefined behaviour.

The value returned by func
 or given to g_thread_exit() is
returned by this function.

g_thread_join() consumes the reference to the passed-in thread
.
This will usually cause the GThread struct and associated resources
to be freed. Use g_thread_ref() to obtain an extra reference if you
want to keep the GThread alive beyond the g_thread_join() call.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

thread

a GThread

Returns

 the return value of the thread

g_thread_yield ()

void
g_thread_yield ();

Causes the calling thread to voluntarily relinquish the CPU, so
that other threads can run.

This function is often used as a method to make busy wait less evil.

g_thread_exit ()

void
g_thread_exit (gpointer retval);

Terminates the current thread.

If another thread is waiting for us using g_thread_join() then the
waiting thread will be woken up and get retval
 as the return value
of g_thread_join().

Calling g_thread_exit() with a parameter retval
 is equivalent to
returning retval
 from the function func
, as given to g_thread_new().

You must only call g_thread_exit() from a thread that you created
yourself with g_thread_new() or related APIs. You must not call
this function from a thread created with another threading library
or or from within a GThreadPool.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

retval

the return value of this thread

g_thread_self ()

GThread *
g_thread_self (void);

This functions returns the GThread corresponding to the
current thread. Note that this function does not increase
the reference count of the returned struct.

This function will return a GThread even for threads that
were not created by GLib (i.e. those created by other threading
APIs). This may be useful for thread identification purposes
(i.e. comparisons) but you must not use GLib functions (such
as g_thread_join()) on these threads.

Returns

 the GThread representing the current thread

g_mutex_init ()

void
g_mutex_init (GMutex *mutex);

Initializes a GMutex so that it can be used.

This function is useful to initialize a mutex that has been
allocated on the stack, or as part of a larger structure.
It is not necessary to initialize a mutex that has been
statically allocated.

1
2
3
4
5
6
7
8
9

typedef struct {
  GMutex m;
  ...
} Blob;

Blob *b;

b = g_new (Blob, 1);
g_mutex_init (&b->m);

To undo the effect of g_mutex_init() when a mutex is no longer
needed, use g_mutex_clear().

Calling g_mutex_init() on an already initialized GMutex leads
to undefined behaviour.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

mutex

an uninitialized GMutex

Since 2.32

g_mutex_clear ()

void
g_mutex_clear (GMutex *mutex);

Frees the resources allocated to a mutex with g_mutex_init().

This function should not be used with a GMutex that has been
statically allocated.

Calling g_mutex_clear() on a locked mutex leads to undefined
behaviour.

Sine: 2.32

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

mutex

an initialized GMutex

g_mutex_lock ()

void
g_mutex_lock (GMutex *mutex);

Locks mutex
. If mutex
 is already locked by another thread, the
current thread will block until mutex
 is unlocked by the other
thread.

GMutex is neither guaranteed to be recursive nor to be
non-recursive.  As such, calling g_mutex_lock() on a GMutex that has
already been locked by the same thread results in undefined behaviour
(including but not limited to deadlocks).

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

mutex

a GMutex

g_mutex_trylock ()

gboolean
g_mutex_trylock (GMutex *mutex);

Tries to lock mutex
. If mutex
 is already locked by another thread,
it immediately returns FALSE. Otherwise it locks mutex
 and returns
TRUE.

GMutex is neither guaranteed to be recursive nor to be
non-recursive.  As such, calling g_mutex_lock() on a GMutex that has
already been locked by the same thread results in undefined behaviour
(including but not limited to deadlocks or arbitrary return values).

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

mutex

a GMutex

Returns

 TRUE if mutex
could be locked

g_mutex_unlock ()

void
g_mutex_unlock (GMutex *mutex);

Unlocks mutex
. If another thread is blocked in a g_mutex_lock()
call for mutex
, it will become unblocked and can lock mutex
 itself.

Calling g_mutex_unlock() on a mutex that is not locked by the
current thread leads to undefined behaviour.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

mutex

a GMutex

G_LOCK_DEFINE()

#define G_LOCK_DEFINE(name)

The G_LOCK_ macros provide a convenient interface to GMutex.
G_LOCK_DEFINE defines a lock. It can appear in any place where
variable definitions may appear in programs, i.e. in the first block
of a function or outside of functions. The name
 parameter will be
mangled to get the name of the GMutex. This means that you
can use names of existing variables as the parameter - e.g. the name
of the variable you intend to protect with the lock. Look at our
give_me_next_number() example using the G_LOCK macros:

Here is an example for using the G_LOCK convenience macros:

1
2
3
4
5
6
7
8
9
10
11
12
13
14

G_LOCK_DEFINE (current_number);

int
give_me_next_number (void)
{
  static int current_number = 0;
  int ret_val;

  G_LOCK (current_number);
  ret_val = current_number = calc_next_number (current_number);
  G_UNLOCK (current_number);

  return ret_val;
}

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

name

the name of the lock

G_LOCK_DEFINE_STATIC()

#define G_LOCK_DEFINE_STATIC(name)

This works like G_LOCK_DEFINE, but it creates a static object.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

name

the name of the lock

G_LOCK_EXTERN()

#define G_LOCK_EXTERN(name)

This declares a lock, that is defined with G_LOCK_DEFINE in another
module.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

name

the name of the lock

G_LOCK()

#define G_LOCK(name)

Works like g_mutex_lock(), but for a lock defined with
G_LOCK_DEFINE.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

name

the name of the lock

G_TRYLOCK()

#define G_TRYLOCK(name)

Works like g_mutex_trylock(), but for a lock defined with
G_LOCK_DEFINE.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

name

the name of the lock

Returns

 TRUE, if the lock could be locked.

G_UNLOCK()

#define G_UNLOCK(name)

Works like g_mutex_unlock(), but for a lock defined with
G_LOCK_DEFINE.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

name

the name of the lock

g_rec_mutex_init ()

void
g_rec_mutex_init (GRecMutex *rec_mutex);

Initializes a GRecMutex so that it can be used.

This function is useful to initialize a recursive mutex
that has been allocated on the stack, or as part of a larger
structure.

It is not necessary to initialise a recursive mutex that has been
statically allocated.

1
2
3
4
5
6
7
8
9

typedef struct {
  GRecMutex m;
  ...
} Blob;

Blob *b;

b = g_new (Blob, 1);
g_rec_mutex_init (&b->m);

Calling g_rec_mutex_init() on an already initialized GRecMutex
leads to undefined behaviour.

To undo the effect of g_rec_mutex_init() when a recursive mutex
is no longer needed, use g_rec_mutex_clear().

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

rec_mutex

an uninitialized GRecMutex

Since 2.32

g_rec_mutex_clear ()

void
g_rec_mutex_clear (GRecMutex *rec_mutex);

Frees the resources allocated to a recursive mutex with
g_rec_mutex_init().

This function should not be used with a GRecMutex that has been
statically allocated.

Calling g_rec_mutex_clear() on a locked recursive mutex leads
to undefined behaviour.

Sine: 2.32

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

rec_mutex

an initialized GRecMutex

g_rec_mutex_lock ()

void
g_rec_mutex_lock (GRecMutex *rec_mutex);

Locks rec_mutex
. If rec_mutex
 is already locked by another
thread, the current thread will block until rec_mutex
 is
unlocked by the other thread. If rec_mutex
 is already locked
by the current thread, the 'lock count' of rec_mutex
 is increased.
The mutex will only become available again when it is unlocked
as many times as it has been locked.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

rec_mutex

a GRecMutex

Since 2.32

g_rec_mutex_trylock ()

gboolean
g_rec_mutex_trylock (GRecMutex *rec_mutex);

Tries to lock rec_mutex
. If rec_mutex
 is already locked
by another thread, it immediately returns FALSE. Otherwise
it locks rec_mutex
 and returns TRUE.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

rec_mutex

a GRecMutex

Returns

 TRUE if rec_mutex
could be locked

Since 2.32

g_rec_mutex_unlock ()

void
g_rec_mutex_unlock (GRecMutex *rec_mutex);

Unlocks rec_mutex
. If another thread is blocked in a
g_rec_mutex_lock() call for rec_mutex
, it will become unblocked
and can lock rec_mutex
 itself.

Calling g_rec_mutex_unlock() on a recursive mutex that is not
locked by the current thread leads to undefined behaviour.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

rec_mutex

a GRecMutex

Since 2.32

g_rw_lock_init ()

void
g_rw_lock_init (GRWLock *rw_lock);

Initializes a GRWLock so that it can be used.

This function is useful to initialize a lock that has been
allocated on the stack, or as part of a larger structure.  It is not
necessary to initialise a reader-writer lock that has been statically
allocated.

1
2
3
4
5
6
7
8
9

typedef struct {
  GRWLock l;
  ...
} Blob;

Blob *b;

b = g_new (Blob, 1);
g_rw_lock_init (&b->l);

To undo the effect of g_rw_lock_init() when a lock is no longer
needed, use g_rw_lock_clear().

Calling g_rw_lock_init() on an already initialized GRWLock leads
to undefined behaviour.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

rw_lock

an uninitialized GRWLock

Since 2.32

g_rw_lock_clear ()

void
g_rw_lock_clear (GRWLock *rw_lock);

Frees the resources allocated to a lock with g_rw_lock_init().

This function should not be used with a GRWLock that has been
statically allocated.

Calling g_rw_lock_clear() when any thread holds the lock
leads to undefined behaviour.

Sine: 2.32

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

rw_lock

an initialized GRWLock

g_rw_lock_writer_lock ()

void
g_rw_lock_writer_lock (GRWLock *rw_lock);

Obtain a write lock on rw_lock
. If any thread already holds
a read or write lock on rw_lock
, the current thread will block
until all other threads have dropped their locks on rw_lock
.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

rw_lock

a GRWLock

Since 2.32

g_rw_lock_writer_trylock ()

gboolean
g_rw_lock_writer_trylock (GRWLock *rw_lock);

Tries to obtain a write lock on rw_lock
. If any other thread holds
a read or write lock on rw_lock
, it immediately returns FALSE.
Otherwise it locks rw_lock
 and returns TRUE.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

rw_lock

a GRWLock

Returns

 TRUE if rw_lock
could be locked

Since 2.32

g_rw_lock_writer_unlock ()

void
g_rw_lock_writer_unlock (GRWLock *rw_lock);

Release a write lock on rw_lock
.

Calling g_rw_lock_writer_unlock() on a lock that is not held
by the current thread leads to undefined behaviour.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

rw_lock

a GRWLock

Since 2.32

g_rw_lock_reader_lock ()

void
g_rw_lock_reader_lock (GRWLock *rw_lock);

Obtain a read lock on rw_lock
. If another thread currently holds
the write lock on rw_lock
 or blocks waiting for it, the current
thread will block. Read locks can be taken recursively.

It is implementation-defined how many threads are allowed to
hold read locks on the same lock simultaneously.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

rw_lock

a GRWLock

Since 2.32

g_rw_lock_reader_trylock ()

gboolean
g_rw_lock_reader_trylock (GRWLock *rw_lock);

Tries to obtain a read lock on rw_lock
 and returns TRUE if
the read lock was successfully obtained. Otherwise it
returns FALSE.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

rw_lock

a GRWLock

Returns

 TRUE if rw_lock
could be locked

Since 2.32

g_rw_lock_reader_unlock ()

void
g_rw_lock_reader_unlock (GRWLock *rw_lock);

Release a read lock on rw_lock
.

Calling g_rw_lock_reader_unlock() on a lock that is not held
by the current thread leads to undefined behaviour.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

rw_lock

a GRWLock

Since 2.32

g_cond_init ()

void
g_cond_init (GCond *cond);

Initialises a GCond so that it can be used.

This function is useful to initialise a GCond that has been
allocated as part of a larger structure.  It is not necessary to
initialise a GCond that has been statically allocated.

To undo the effect of g_cond_init() when a GCond is no longer
needed, use g_cond_clear().

Calling g_cond_init() on an already-initialised GCond leads
to undefined behaviour.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

cond

an uninitialized GCond

Since 2.32

g_cond_clear ()

void
g_cond_clear (GCond *cond);

Frees the resources allocated to a GCond with g_cond_init().

This function should not be used with a GCond that has been
statically allocated.

Calling g_cond_clear() for a GCond on which threads are
blocking leads to undefined behaviour.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

cond

an initialised GCond

Since 2.32

g_cond_wait ()

void
g_cond_wait (GCond *cond,
             GMutex *mutex);

Atomically releases mutex
 and waits until cond
 is signalled.
When this function returns, mutex
 is locked again and owned by the
calling thread.

When using condition variables, it is possible that a spurious wakeup
may occur (ie: g_cond_wait() returns even though g_cond_signal() was
not called).  It's also possible that a stolen wakeup may occur.
This is when g_cond_signal() is called, but another thread acquires
mutex
 before this thread and modifies the state of the program in
such a way that when g_cond_wait() is able to return, the expected
condition is no longer met.

For this reason, g_cond_wait() must always be used in a loop.  See
the documentation for GCond for a complete example.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

cond

a GCond

mutex

a GMutex that is currently locked

g_cond_timed_wait ()

gboolean
g_cond_timed_wait (GCond *cond,
                   GMutex *mutex,
                   GTimeVal *abs_time);

g_cond_timed_wait has been deprecated since version 2.32 and should not be used in newly-written code.

Use g_cond_wait_until() instead.

Waits until this thread is woken up on cond
, but not longer than
until the time specified by abs_time
. The mutex
 is unlocked before
falling asleep and locked again before resuming.

If abs_time
 is NULL, g_cond_timed_wait() acts like g_cond_wait().

This function can be used even if g_thread_init() has not yet been
called, and, in that case, will immediately return TRUE.

To easily calculate abs_time
 a combination of g_get_current_time()
and g_time_val_add() can be used.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

cond

a GCond

mutex

a GMutex that is currently locked

abs_time

a GTimeVal, determining the final time

Returns

 TRUE if cond
was signalled, or FALSE on timeout

g_cond_wait_until ()

gboolean
g_cond_wait_until (GCond *cond,
                   GMutex *mutex,
                   gint64 end_time);

Waits until either cond
 is signalled or end_time
 has passed.

As with g_cond_wait() it is possible that a spurious or stolen wakeup
could occur.  For that reason, waiting on a condition variable should
always be in a loop, based on an explicitly-checked predicate.

TRUE is returned if the condition variable was signalled (or in the
case of a spurious wakeup).  FALSE is returned if end_time
 has
passed.

The following code shows how to correctly perform a timed wait on a
condition variable (extending the example presented in the
documentation for GCond):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

gpointer
pop_data_timed (void)
{
  gint64 end_time;
  gpointer data;

  g_mutex_lock (&data_mutex);

  end_time = g_get_monotonic_time () + 5 * G_TIME_SPAN_SECOND;
  while (!current_data)
    if (!g_cond_wait_until (&data_cond, &data_mutex, end_time))
      {
        // timeout has passed.
        g_mutex_unlock (&data_mutex);
        return NULL;
      }

  // there is data for us
  data = current_data;
  current_data = NULL;

  g_mutex_unlock (&data_mutex);

  return data;
}

Notice that the end time is calculated once, before entering the
loop and reused.  This is the motivation behind the use of absolute
time on this API -- if a relative time of 5 seconds were passed
directly to the call and a spurious wakeup occurred, the program would
have to start over waiting again (which would lead to a total wait
time of more than 5 seconds).

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

cond

a GCond

mutex

a GMutex that is currently locked

end_time

the monotonic time to wait until

Returns

 TRUE on a signal, FALSE on a timeout

Since 2.32

g_cond_signal ()

void
g_cond_signal (GCond *cond);

If threads are waiting for cond
, at least one of them is unblocked.
If no threads are waiting for cond
, this function has no effect.
It is good practice to hold the same lock as the waiting thread
while calling this function, though not required.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

cond

a GCond

g_cond_broadcast ()

void
g_cond_broadcast (GCond *cond);

If threads are waiting for cond
, all of them are unblocked.
If no threads are waiting for cond
, this function has no effect.
It is good practice to lock the same mutex as the waiting threads
while calling this function, though not required.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

cond

a GCond

G_PRIVATE_INIT()

#define G_PRIVATE_INIT(notify)

A macro to assist with the static initialisation of a GPrivate.

This macro is useful for the case that a GDestroyNotify function
should be associated the key.  This is needed when the key will be
used to point at memory that should be deallocated when the thread
exits.

Additionally, the GDestroyNotify will also be called on the previous
value stored in the key when g_private_replace() is used.

If no GDestroyNotify is needed, then use of this macro is not
required -- if the GPrivate is declared in static scope then it will
be properly initialised by default (ie: to all zeros).  See the
examples below.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

static GPrivate name_key = G_PRIVATE_INIT (g_free);

// return value should not be freed
const gchar *
get_local_name (void)
{
  return g_private_get (&name_key);
}

void
set_local_name (const gchar *name)
{
  g_private_replace (&name_key, g_strdup (name));
}

static GPrivate count_key;   // no free function

gint
get_local_count (void)
{
  return GPOINTER_TO_INT (g_private_get (&count_key));
}

void
set_local_count (gint count)
{
  g_private_set (&count_key, GINT_TO_POINTER (count));
}

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

notify

a GDestroyNotify

Since 2.32

g_private_get ()

gpointer
g_private_get (GPrivate *key);

Returns the current value of the thread local variable key
.

If the value has not yet been set in this thread, NULL is returned.
Values are never copied between threads (when a new thread is
created, for example).

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

key

a GPrivate

Returns

 the thread-local value

g_private_set ()

void
g_private_set (GPrivate *key,
               gpointer value);

Sets the thread local variable key
 to have the value value
 in the
current thread.

This function differs from g_private_replace() in the following way:
the GDestroyNotify for key
 is not called on the old value.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

key

a GPrivate

value

the new value

g_private_replace ()

void
g_private_replace (GPrivate *key,
                   gpointer value);

Sets the thread local variable key
 to have the value value
 in the
current thread.

This function differs from g_private_set() in the following way: if
the previous value was non-NULL then the GDestroyNotify handler for
key
 is run on it.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

key

a GPrivate

value

the new value

Since 2.32

g_once()

#define             g_once(once, func, arg)

The first call to this routine by a process with a given GOnce
struct calls func
 with the given argument. Thereafter, subsequent
calls to g_once()  with the same GOnce struct do not call func

again, but return the stored result of the first call. On return
from g_once(), the status of once
 will be G_ONCE_STATUS_READY.

For example, a mutex or a thread-specific data key must be created
exactly once. In a threaded environment, calling g_once() ensures
that the initialization is serialized across multiple threads.

Calling g_once() recursively on the same GOnce struct in
func
 will lead to a deadlock.

1
2
3
4
5
6
7
8
9

gpointer
get_debug_flags (void)
{
  static GOnce my_once = G_ONCE_INIT;

  g_once (&my_once, parse_debug_flags, NULL);

  return my_once.retval;
}

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

once

a GOnce structure

func

the GThreadFunc function associated to once
. This function
is called only once, regardless of the number of times it and
its associated GOnce struct are passed to g_once().

arg

data to be passed to func

Since 2.4

g_once_init_enter ()

gboolean
g_once_init_enter (volatile void *location);

Function to be called when starting a critical initialization
section. The argument location
 must point to a static
0-initialized variable that will be set to a value other than 0 at
the end of the initialization section. In combination with
g_once_init_leave() and the unique address value_location
, it can
be ensured that an initialization section will be executed only once
during a program's life time, and that concurrent threads are
blocked until initialization completed. To be used in constructs
like this:

1
2
3
4
5
6
7
8
9
10

static gsize initialization_value = 0;

if (g_once_init_enter (&initialization_value))
  {
    gsize setup_value = 42; // initialization code here

    g_once_init_leave (&initialization_value, setup_value);
  }

// use initialization_value here

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

location

location of a static initializable variable containing 0

Returns

 TRUE if the initialization section should be entered,
FALSE and blocks otherwise

Since 2.14

g_once_init_leave ()

void
g_once_init_leave (volatile void *location,
                   gsize result);

Counterpart to g_once_init_enter(). Expects a location of a static
0-initialized initialization variable, and an initialization value
other than 0. Sets the variable to the initialization value, and
releases concurrent threads blocking in g_once_init_enter() on this
initialization variable.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

location

location of a static initializable variable containing 0

result

new non-0 value for *value_location

Since 2.14

g_bit_lock ()

void
g_bit_lock (volatile gint *address,
            gint lock_bit);

Sets the indicated lock_bit
 in address
.  If the bit is already
set, this call will block until g_bit_unlock() unsets the
corresponding bit.

Attempting to lock on two different bits within the same integer is
not supported and will very probably cause deadlocks.

The value of the bit that is set is (1u << bit
).  If bit
 is not
between 0 and 31 then the result is undefined.

This function accesses address
 atomically.  All other accesses to
address
 must be atomic in order for this function to work
reliably.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

address

a pointer to an integer

lock_bit

a bit value between 0 and 31

Since 2.24

g_bit_trylock ()

gboolean
g_bit_trylock (volatile gint *address,
               gint lock_bit);

Sets the indicated lock_bit
 in address
, returning TRUE if
successful.  If the bit is already set, returns FALSE immediately.

Attempting to lock on two different bits within the same integer is
not supported.

The value of the bit that is set is (1u << bit
).  If bit
 is not
between 0 and 31 then the result is undefined.

This function accesses address
 atomically.  All other accesses to
address
 must be atomic in order for this function to work
reliably.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

address

a pointer to an integer

lock_bit

a bit value between 0 and 31

Returns

 TRUE if the lock was acquired

Since 2.24

g_bit_unlock ()

void
g_bit_unlock (volatile gint *address,
              gint lock_bit);

Clears the indicated lock_bit
 in address
.  If another thread is
currently blocked in g_bit_lock() on this same bit then it will be
woken up.

This function accesses address
 atomically.  All other accesses to
address
 must be atomic in order for this function to work
reliably.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

address

a pointer to an integer

lock_bit

a bit value between 0 and 31

Since 2.24

g_pointer_bit_lock ()

void
g_pointer_bit_lock (volatile void *address,
                    gint lock_bit);

This is equivalent to g_bit_lock, but working on pointers (or other
pointer-sized values).

For portability reasons, you may only lock on the bottom 32 bits of
the pointer.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

address

a pointer to a gpointer-sized value

lock_bit

a bit value between 0 and 31

Since 2.30

g_pointer_bit_trylock ()

gboolean
g_pointer_bit_trylock (volatile void *address,
                       gint lock_bit);

This is equivalent to g_bit_trylock, but working on pointers (or
other pointer-sized values).

For portability reasons, you may only lock on the bottom 32 bits of
the pointer.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

address

a pointer to a gpointer-sized value

lock_bit

a bit value between 0 and 31

Returns

 TRUE if the lock was acquired

Since 2.30

g_pointer_bit_unlock ()

void
g_pointer_bit_unlock (volatile void *address,
                      gint lock_bit);

This is equivalent to g_bit_unlock, but working on pointers (or other
pointer-sized values).

For portability reasons, you may only lock on the bottom 32 bits of
the pointer.

Parameters

<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>

address

a pointer to a gpointer-sized value

lock_bit

a bit value between 0 and 31

Since 2.30

g_get_num_processors ()

guint
g_get_num_processors (void);

Determine the approximate number of threads that the system will
schedule simultaneously for this process.  This is intended to be
used as a parameter to g_thread_pool_new() for CPU bound tasks and
similar cases.

Returns

 Number of schedulable threads, always greater than 0

Since 2.36

Types and Values

G_THREAD_ERROR

#define G_THREAD_ERROR g_thread_error_quark ()

The error domain of the GLib thread subsystem.

enum GThreadError

Possible errors of thread related functions.

Members

<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>

G_THREAD_ERROR_AGAIN

a thread couldn't be created due to resource
                       shortage. Try again later.

GThread

typedef struct {
} GThread;

The GThread struct represents a running thread. This struct
is returned by g_thread_new() or g_thread_try_new(). You can
obtain the GThread struct representing the current thread by
calling g_thread_self().

GThread is refcounted, see g_thread_ref() and g_thread_unref().
The thread represented by it holds a reference while it is running,
and g_thread_join() consumes the reference that it is given, so
it is normally not necessary to manage GThread references
explicitly.

The structure is opaque -- none of its fields may be directly
accessed.

union GMutex

The GMutex struct is an opaque data structure to represent a mutex
(mutual exclusion). It can be used to protect data against shared
access.

Take for example the following function:

1
2
3
4
5
6
7
8
9
10
11

int
give_me_next_number (void)
{
  static int current_number = 0;

  // now do a very complicated calculation to calculate the new
  // number, this might for example be a random number generator
  current_number = calc_next_number (current_number);

  return current_number;
}

It is easy to see that this won't work in a multi-threaded
application. There current_number must be protected against shared
access. A GMutex can be used as a solution to this problem:

1
2
3
4
5
6
7
8
9
10
11
12
13

int
give_me_next_number (void)
{
  static GMutex mutex;
  static int current_number = 0;
  int ret_val;

  g_mutex_lock (&mutex);
  ret_val = current_number = calc_next_number (current_number);
  g_mutex_unlock (&mutex);

  return ret_val;
}

Notice that the GMutex is not initialised to any particular value.
Its placement in static storage ensures that it will be initialised
to all-zeros, which is appropriate.

If a GMutex is placed in other contexts (eg: embedded in a struct)
then it must be explicitly initialised using g_mutex_init().

A GMutex should only be accessed via g_mutex_ functions.

struct GRecMutex

struct GRecMutex {
};

The GRecMutex struct is an opaque data structure to represent a
recursive mutex. It is similar to a GMutex with the difference
that it is possible to lock a GRecMutex multiple times in the same
thread without deadlock. When doing so, care has to be taken to
unlock the recursive mutex as often as it has been locked.

If a GRecMutex is allocated in static storage then it can be used
without initialisation.  Otherwise, you should call
g_rec_mutex_init() on it and g_rec_mutex_clear() when done.

A GRecMutex should only be accessed with the
g_rec_mutex_ functions.

Since 2.32

struct GRWLock

struct GRWLock {
};

The GRWLock struct is an opaque data structure to represent a
reader-writer lock. It is similar to a GMutex in that it allows
multiple threads to coordinate access to a shared resource.

The difference to a mutex is that a reader-writer lock discriminates
between read-only ('reader') and full ('writer') access. While only
one thread at a time is allowed write access (by holding the 'writer'
lock via g_rw_lock_writer_lock()), multiple threads can gain
simultaneous read-only access (by holding the 'reader' lock via
g_rw_lock_reader_lock()).

Here is an example for an array with access functions:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

GRWLock lock;
GPtrArray *array;

gpointer
my_array_get (guint index)
{
  gpointer retval = NULL;

  if (!array)
    return NULL;

  g_rw_lock_reader_lock (&lock);
  if (index < array->len)
    retval = g_ptr_array_index (array, index);
  g_rw_lock_reader_unlock (&lock);

  return retval;
}

void
my_array_set (guint index, gpointer data)
{
  g_rw_lock_writer_lock (&lock);

  if (!array)
    array = g_ptr_array_new ();

  if (index >= array->len)
    g_ptr_array_set_size (array, index+1);
  g_ptr_array_index (array, index) = data;

  g_rw_lock_writer_unlock (&lock);
}

This example shows an array which can be accessed by many readers
(the my_array_get() function) simultaneously, whereas the writers
(the my_array_set() function) will only be allowed one at a time
and only if no readers currently access the array. This is because
of the potentially dangerous resizing of the array. Using these
functions is fully multi-thread safe now.

If a GRWLock is allocated in static storage then it can be used
without initialisation.  Otherwise, you should call
g_rw_lock_init() on it and g_rw_lock_clear() when done.

A GRWLock should only be accessed with the g_rw_lock_ functions.

Since 2.32

struct GCond

struct GCond {
};

The GCond struct is an opaque data structure that represents a
condition. Threads can block on a GCond if they find a certain
condition to be false. If other threads change the state of this
condition they signal the GCond, and that causes the waiting
threads to be woken up.

Consider the following example of a shared variable.  One or more
threads can wait for data to be published to the variable and when
another thread publishes the data, it can signal one of the waiting
threads to wake up to collect the data.

Here is an example for using GCond to block a thread until a condition
is satisfied:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

gpointer current_data = NULL;
GMutex data_mutex;
GCond data_cond;

void
push_data (gpointer data)
{
  g_mutex_lock (&data_mutex);
  current_data = data;
  g_cond_signal (&data_cond);
  g_mutex_unlock (&data_mutex);
}

gpointer
pop_data (void)
{
  gpointer data;

  g_mutex_lock (&data_mutex);
  while (!current_data)
    g_cond_wait (&data_cond, &data_mutex);
  data = current_data;
  current_data = NULL;
  g_mutex_unlock (&data_mutex);

  return data;
}

Whenever a thread calls pop_data() now, it will wait until
current_data is non-NULL, i.e. until some other thread
has called push_data().

The example shows that use of a condition variable must always be
paired with a mutex.  Without the use of a mutex, there would be a
race between the check of current_data
 by the while loop in
pop_data() and waiting. Specifically, another thread could set
current_data
 after the check, and signal the cond (with nobody
waiting on it) before the first thread goes to sleep. GCond is
specifically useful for its ability to release the mutex and go
to sleep atomically.

It is also important to use the g_cond_wait() and g_cond_wait_until()
functions only inside a loop which checks for the condition to be
true.  See g_cond_wait() for an explanation of why the condition may
not be true even after it returns.

If a GCond is allocated in static storage then it can be used
without initialisation.  Otherwise, you should call g_cond_init()
on it and g_cond_clear() when done.

A GCond should only be accessed via the g_cond_ functions.

struct GPrivate

struct GPrivate {
};

The GPrivate struct is an opaque data structure to represent a
thread-local data key. It is approximately equivalent to the
pthread_setspecific()/pthread_getspecific() APIs on POSIX and to
TlsSetValue()/TlsGetValue() on Windows.

If you don't already know why you might want this functionality,
then you probably don't need it.

GPrivate is a very limited resource (as far as 128 per program,
shared between all libraries). It is also not possible to destroy a
GPrivate after it has been used. As such, it is only ever acceptable
to use GPrivate in static scope, and even then sparingly so.

See G_PRIVATE_INIT() for a couple of examples.

The GPrivate structure should be considered opaque.  It should only
be accessed via the g_private_ functions.

struct GOnce

struct GOnce {
  volatile GOnceStatus status;
  volatile gpointer retval;
};

A GOnce struct controls a one-time initialization function. Any
one-time initialization function must have its own unique GOnce
struct.

Members

<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>

volatile GOnceStatus status;

the status of the GOnce

volatile gpointer retval;

the value returned by the call to the function, if status
is G_ONCE_STATUS_READY

Since 2.4

enum GOnceStatus

The possible statuses of a one-time initialization function
controlled by a GOnce struct.

Members

<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>

G_ONCE_STATUS_NOTCALLED

the function has not been called yet.

G_ONCE_STATUS_PROGRESS

the function call is currently in progress.

G_ONCE_STATUS_READY

the function has been called.

Since 2.4

G_ONCE_INIT

#define G_ONCE_INIT { G_ONCE_STATUS_NOTCALLED, NULL }

A GOnce must be initialized with this macro before it can be used.

1

GOnce my_once = G_ONCE_INIT;

Since 2.4

See Also

GThreadPool, GAsyncQueue

          Generated by GTK-Doc V1.21.1

redpajama_set_name: RedPajamaGithub


Just to share as I was blown away by it's sheer beauty. Please watch in HD.
Amazing! compare the size of the tank and the people watching.
Wow I'm amazed by this.
And i thought a 7 footer was big...This is truly amazing.
is the diver cleaning the tank in there?
where is this place!!? Awesome!
tks 4 d vid...really enjoy it..awesome..
This is truly awesome thanks for sharing!


text:
Read Next:	Fox Renews 'MasterChef Junior,' Adds Daphne Oz as Judge
April 17, 2015 10:00AM PT
BBC Reigns Globally With 'Wolf Hall' Adaptation
By Leo Barraclough
Leo Barraclough
Senior International Correspondent @https://twitter.com/LeoBarraclough	FOLLOW
Leo's Most Recent Stories
Carice van Houten's 'Instinct' Picked Up By Films Boutique (EXCLUSIVE)
Greek Director Syllas Tzoumerkas on the Need for Defiance
Sony Pictures Classics' Dylan Leiner on Getting Filmmakers and Distributors on the Same Page
CREDIT: Courtesy of PBS
A Booker Prize-winning pair of novels about the middle-aged manager of Henry VIII's court doesn't sound like the next hit literary property for the stage and screen, but "Wolf Hall" has so far turned conventional wisdom on its head.
Hilary Mantel's 2009 hit novel — which sold nearly 3 million copies in the U.K. and U.S. — and sequel "Bring Up the Bodies" (2012) have already been adapted into a critically acclaimed hit by Mike Poulton at London's Royal Shakespeare Company, and its current Broadway transfer has grossed almost $2 million in previews since March 20; it opened April 9.
Three months earlier, nearly 4 million British viewers watched the six-part series' first episode Jan. 21 on BBC Two, the highbrow channel's biggest audience for a drama series in a decade.
The April 5 PBS debut of the series, starring Mark Rylance as the king's right-hand man, statesman Thomas Cromwell, along with Damien Lewis ("Homeland") as Henry and Jonathan Pryce ("Game of Thrones") as Cromwell's mentor, Cardinal Wolsey, scored 40% above the national ratings average for the night, and wowed American critics. PBS is releasing a DVD/Blu-ray set April 28.
BBC Worldwide, which is selling the series internationally, knew it had something big on its hands when it invited 600 buyers to a "Wolf Hall"-themed feast in Liverpool Cathedral during its sales event in the city in February.
But when Peter Straughan took the job of adapting the books for the smallscreen in 2012, he faced a whole host of challenges, most notably one that was still rocking the British screenwriter to his core.
Straughan's wife and writing partner, Bridget O'Connor (with whom he shared an Oscar nomination for "Tinker Tailor Soldier Spy"), had died in October 2010, and he felt he needed to take a break from writing, which soon stretched out to more than a year.
"Part of me was frightened that maybe I wasn't going to write again," he says. "Then I got sent 'Wolf Hall' to read, and that's what made me want to write again. I owe a great debt to it."
But the length of the two novels — more than 1,000 pages combined — along with their plot complexity meant decisions had to be made. Straughan pulled out a strand of the story to form a backbone for the series: Cromwell's loyalty to Wolsey, and his desire for revenge against those who caused his mentor's downfall.
Executive producer Colin Callender of New York-based Playground Entertainment, which produced the miniseries along with the U.K.'s Company Pictures, says the decision to hire Straughan was made quickly. "You needed someone who understood structure, who could find the narrative spine and drive that through the thousand pages. When we sat down with Peter, it was one of those great meetings when you say, 'Stop, let's just do the deal,' " Callender says. He adds that the first draft was "jaw-droppingly great," and the BBC greenlit the project immediately.
During the writing process, Straughan was often in touch with Mantel, asking for advice or clarification, and checking her reaction to changes and compressions. "The good novelists understand that the adaptation process is about having to break something down and put it together again in a different way," Straughan says. "That was true of Hilary. She was incredibly generous and helpful."
With a solid first draft in hand, Callender was able to bring Rylance and director Peter Kosminsky aboard. But a key, Callender says, was in having defined the parameters of the project early on.
"In the very first meeting with Hilary Mantel," says Callender, "we talked about two things. First, about how there was a way to tell history in a complex way that didn't need to pander to the audience. You didn't have to change events to tell a story; you could trust an audience to go on a journey with you.
"The second thing," he adds, "was that we wanted to put the characters and the audience into the story without the benefit of hindsight, so they didn't know what was going to happen next; creating a world from Thomas Cromwell's point of view, where he doesn't know the consequences of his actions, and exploring the moral complexity at the center of this man's life as he is trying to navigate the Tudor court — to do the right thing and yet survive; the tension between pragmatism and idealism."
The approach certainly worked during the February sales pitch. Besides PBS, buyers have included Arte for France and Germany, SVT in Sweden, DR in Denmark, YLE in Finland, BBC First in Australia, and several other territories — Israel, Greece, Slovenia and Croatia among them.
Let the royal tour continue.
Weekly Online


MIFF #4: The filmmaker Luc Moullet hails from the Southern Alps of France and he has noticed a bizarre habit in the inhabitants of the region. Land of Madness is his quirky investigation as to why a 'pentagon of insanity' exists in this remote area of France and Moullet delivers his narration with deadpan drollness as he describes a litany of murders, suicides and immolations committed by his compatriots.
The repetition of horrors became a bit tedious after a while and there were a slow trickle of people exiting the cinema after the first half. I stayed till the end because I wanted to see how he would finish it – and the set-up debate was one of the better moments of the film.