I love to run, but I don’t run fast. Consequently, speed work often lands on my “should do” list. In early 2016, I decided to get serious about getting faster. By March 31, I wanted to be able to make it through a progressive treadmill speed workout that I’d clipped from a fitness magazine. After a warmup, this involved running two minutes at six miles per hour (easy for me), two minutes at seven miles per hour (a little tougher but doable), two minutes at eight miles per hour (hard), and two minutes at nine miles per hour.

Those last two minutes proved treacherous. For two months, I eked out progress, slowing the treadmill again and again before time was up.

Then, three weeks before my deadline, stuck at about one minute of that top speed, I posted on my blog about my increasing velocity and the challenges I was facing. I also said I would keep trying.

After I hit “publish,” I never attempted my speed goal again.

From time to time over the past three years, I’ve wondered what happened: Was there something in telling people about my progress that pushed me to quit?

It’s an important question. People tell friends and family about their goals to get support, hold themselves accountable, and share their excitement. Today, social media and goal-sharing apps make it possible to announce your intentions to an even bigger audience. But whether it’s wise to do so depends on two things: the kind of goal you’re pursuing and how you respond to expectations.

One of the most obvious upsides of publicizing your goals is the support that it can bring. In one 2013 study, for instance, people in a weight-loss trial who shared their progress with each other on Twitter lost more weight than those less engaged with social media. Research from Stickk, an online platform to help people pursue goals, found that users who appoint a “referee” (someone to verify progress and keep them accountable) double their chances of success.

“It’s difficult to deal with setbacks, and we are often harder on ourselves than other people would be on us,” says psychologist Art Markman, a professor at the University of Texas and the author of the book Smart Change. When the initial enthusiasm wears off, he says, “other people in your life can point you back. They can help you see the progress you’ve made that you don’t feel anymore.”

Wisconsin resident Amy Schlotthauer, who works in health care and has two young children, started a running blog called Road Back to Boston as a way of holding herself accountable in her marathon training. After qualifying for the Boston Marathon, she blogged and posted on social media about her “big, scary goal” of running a marathon in less than three hours.

The positive feedback from readers “really helped me get through all of the necessary training, because I had people cheering me on throughout the journey,” Schlotthauer says. Indeed, their support helped her at the most critical moment: the starting line for Grandma’s Marathon in Duluth, Minnesota, where she met people who’d read about her intention. Their encouragement “was the last bit of a confidence boost I needed to push myself through that race and meet my sub-three-hour goal.”

Sharing goals also has practical upsides. “If you’re trying to do anything significant, you often need other people’s help to do it,” Markman says. When he was applying for a new position at his university, for example, “I talked to a lot of people to get advice.” An entrepreneur talking about a business goal might score leads on new clients. While public sharing raises the possibility of public failure, it’s often mitigated by the fact that sharing also helps create a support network in the event of disappointment. Markman did not land the position he was applying for, but all those conversations helped open up a different opportunity.

That said, not all goal sharing is beneficial. Something like “run a sub-three-hour marathon” is measurable and specific. Other desires, like being a good parent or a great scientist, fall into the category of “identity goals” — things that are tied not to a concrete outcome but to who you are as a person. Some research suggests that sharing these goals can backfire, pushing you further away from who you want to become.

In a study published in 2009 in Psychological Science, New York University psychology professor Peter M. Gollwitzer and colleagues asked undergraduate aspiring psychologists to write about their study intentions for the next week, focusing on actions that would bring them closer to their desired career. In some cases, the experimenters made it clear that they would read these plans; in others, students were led to believe that no one would see them. Following up a week later, the researchers found that the students in that first group had followed through with their intentions on fewer days than those who thought their goals had remained private.

One explanation, Gollwitzer says, is that an identity goal is “not something you can easily complete” — without a concrete marker of success, you’re never truly done working toward it. Instead, you collect various indicators or symbols, bits of evidence supporting your aspired-to identity. If you don’t see many of these, this state of incompleteness urges you to move forward. But if you do feel a sense of completeness, “then you do not have the urge anymore to finish the thing,” he explains.

Announcing that you’re writing a screenplay, for example, is already a positive indicator of your screenwriter status. No need to spend an hour today actually writing. Or, in the case of the psychology students, talking about studying to become a psychologist can sap away the motivation to actually do the studying.

The goal doesn’t have to be career-related, either. “If you tell all your colleagues at work what a wonderful dad you are and what you’re going to do on the weekend to make your kids happy… I’m not sure this is a great idea,” Gollwitzer says. You’ve already received the “good parent” vibes; that envisioned bike trip might not happen.

In general, though, the benefits of sharing a goal — of any kind — may depend on how accountable you feel to the audience. “If the audience has control over you, then the audience will make sure you will do what you said you’d do,” Gollwitzer says. That’s why all but the most stubborn souls feel accountable to their managers. But that control doesn’t have to be literal, necessarily; it depends how tightly your identity is connected to being the sort of person who does what she says she will, even to people you don’t know.

Torrie Meidell, a teacher turned stay-at-home mom, runs the blog To Love and to Learn, where she regularly posts about her personal goals, including finishing a marathon and trying a strict elimination diet to help get an autoimmune disease under control. While she thinks her readers would’ve understood if she had needed to abandon either goal, sharing publicly “made me think twice before skipping a run, and it made it so that I never ‘cheated’ on the diet, since I knew that at some point I’d be ‘reporting’ to my readers,” she says.

With my running goal, it’s possible that, unlike Meidell, I didn’t feel accountable to people I didn’t know in person. Perhaps if I’d recruited a friend or paid a trainer to come cheer me on as I slogged it out on the treadmill, that might have made a difference.

Or — and I think this is most likely — I no longer cared. With some goals, “we recognize, at least implicitly, that our motivation to do something is flagging,” Markman says. “You think, ‘Well, my last gasp effort to rev myself up for this is to tell everybody.’ You blow the last bit of mental energy related to this in the telling.”

In other words, it wasn’t sharing my goal that was the problem. The truth was that I’d already accepted I wasn’t going to make my deadline. Regardless of who I’d already told, it was time to move on.